From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Finer control over what gets written to the history file
Date: Tue, 15 Oct 2013 22:25:04 -0700 [thread overview]
Message-ID: <131015222504.ZM3017@torch.brasslantern.com> (raw)
In-Reply-To: <20131015175838.19f0256d@pwslap01u.europe.root.pri>
Incidentally ...
On Oct 15, 5:58pm, Peter Stephenson quoted the docs:
>
> zshaddhistory
> The following example function first adds the history line to
> the normal history with the newline stripped, which is usually
> the correct behaviour. Then it switches the history context so
> that the line will be written to a history file in the current
> directory.
>
> zshaddhistory() {
> print -sr -- ${1%%$'\n'}
> fc -p .zsh_local_history
> }
This doesn't quite work, does it? The missing bit being that you also
must have INC_APPEND_HISTORY set, otherwise the stack is popped before
anything is written.
next prev parent reply other threads:[~2013-10-16 5:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 16:41 Bart Schaefer
2013-10-15 16:58 ` Peter Stephenson
2013-10-16 0:34 ` Bart Schaefer
2013-10-16 8:55 ` Peter Stephenson
2013-10-16 9:20 ` Peter Stephenson
2013-10-17 14:20 ` Bart Schaefer
2013-10-17 14:28 ` Peter Stephenson
2013-10-16 10:04 ` Peter Stephenson
2013-10-16 5:25 ` Bart Schaefer [this message]
2013-10-16 8:35 ` Peter Stephenson
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=131015222504.ZM3017@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--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).