Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: additionally saving history for each directory?



Figured I'd follow up with this on workers since I never got a
response on whether

save_per_directory_history () {
  setopt localoptions incappendhistory
  fc -p -a .zsh_local_history 1000
  print -sr -- ${1%%$'\n'}
}

should work in zshaddhistory_functions for saving local history.

I'm seeing the local history file getting created if it does not
exist, but nothing is ever written to it (zero size).

If I remove the 'print -sr' the local history files do not get
created, so it seems like the print should be adding the history
line..

thank you,
Greg




Messages sorted by: Reverse Date, Date, Thread, Author