From: Greg Klanderman <gak@klanderman.net>
To: Zsh list <zsh-workers@zsh.org>
Subject: Re: additionally saving history for each directory?
Date: Mon, 08 Feb 2021 20:26:07 -0500 [thread overview]
Message-ID: <87sg662frk.fsf@lwm.klanderman.net> (raw)
In-Reply-To: <878s8yksp0.fsf@lwm.klanderman.net> (Greg Klanderman's message of "Tue, 12 Jan 2021 11:47:55 -0500")
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
next parent reply other threads:[~2021-02-09 1:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <24543.52705.896312.857217@lwm.klanderman.net>
[not found] ` <CAH+w=7bVbYNqSHzWAtJ36f5s4WYn+YGJW-oWk8ppPkQtQQ70rw@mail.gmail.com>
[not found] ` <877dp9omok.fsf@lwm.klanderman.net>
[not found] ` <878s8yksp0.fsf@lwm.klanderman.net>
2021-02-09 1:26 ` Greg Klanderman [this message]
2021-02-09 5:31 ` Bart Schaefer
2021-02-09 19:20 ` Greg Klanderman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg662frk.fsf@lwm.klanderman.net \
--to=gak@klanderman.net \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).