From: Richard Hartmann <richih.mailinglist@gmail.com>
To: zsh-workers@zsh.org
Subject: Proposed feature: Selectively avoid adding to history (with code)
Date: Mon, 22 Feb 2010 18:42:41 +0100 [thread overview]
Message-ID: <2d460de71002220942y27ad63acxa3df7a9838ace0b8@mail.gmail.com> (raw)
Hi all,
I am running this function. It's a bit like HIST_IGNORE_SPACE just without
leading whitespace.
zshaddhistory(){if [[ -n $FOO ]]; then return 1; fi}
If you set $FOO, you will not save anything to your history. If you unset
it, you will save again.
This allows me to modify my prompt, giving a visual clue that I am in
try-out mode and will not put random testing stuff into my history.
The control variable is deliberately named $FOO because I wanted to ask:
1) If anyone else thinks this is useful and if it should be a _function
2) If "$HIST_NO_STORE" is a good variable name
3) If this would be better handled in an option
Thanks,
Richard
next reply other threads:[~2010-02-22 17:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 17:42 Richard Hartmann [this message]
2010-02-23 2:47 ` Bart Schaefer
2010-02-23 7:57 ` Mikael Magnusson
2010-02-23 9:42 ` Richard Hartmann
2010-02-23 9:41 ` Richard Hartmann
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=2d460de71002220942y27ad63acxa3df7a9838ace0b8@mail.gmail.com \
--to=richih.mailinglist@gmail.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).