Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: additionally saving history for each directory?
- X-seq: zsh-workers 47958
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: Zsh list <zsh-workers@xxxxxxx>
- Subject: Re: additionally saving history for each directory?
- Date: Mon, 08 Feb 2021 20:26:07 -0500
- Archived-at: <https://zsh.org/workers/47958>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-02/87sg662frk.fsf%40lwm.klanderman.net>
- In-reply-to: <878s8yksp0.fsf@lwm.klanderman.net> (Greg Klanderman's message of "Tue, 12 Jan 2021 11:47:55 -0500")
- List-id: <zsh-workers.zsh.org>
- References: <24543.52705.896312.857217@lwm.klanderman.net> <CAH+w=7bVbYNqSHzWAtJ36f5s4WYn+YGJW-oWk8ppPkQtQQ70rw@mail.gmail.com> <877dp9omok.fsf@lwm.klanderman.net> <878s8yksp0.fsf@lwm.klanderman.net>
- Reply-to: Greg Klanderman <gak@xxxxxxxxxxxxxx>
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