From: Ramkumar Ramachandra <artagnon@gmail.com>
To: zsh-users@zsh.org
Subject: Excluding command from history list
Date: Fri, 23 Jan 2015 12:32:26 -0500 [thread overview]
Message-ID: <CALkWK0mng_gN+5nfGJ14A6Xnh8n80TwDb8MxVWe6usaZLxo0Pg@mail.gmail.com> (raw)
Hi,
I have this problem where I'm always at the risk of hitting RET at the
wrong command during a ^R survey. Especially if you have commit access
to an important codebase,
$ git svn dcommit
or
$ git push -f
might be a disastrous at the wrong time. Hence, I want to exclude
*dcommit* from the history list; excluding it from the history file is
pretty simple:
zshaddhistory () {
[[ $1 != *dcommit* ]]
}
... but I haven't figured out how to do it for the history list, which
is what really matters (because you're always looking for recent
history).
Thanks.
Ram
next reply other threads:[~2015-01-23 17:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 17:32 Ramkumar Ramachandra [this message]
2015-01-24 4:47 ` Bart Schaefer
2015-01-24 15:21 ` Daniel Shahaf
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=CALkWK0mng_gN+5nfGJ14A6Xnh8n80TwDb8MxVWe6usaZLxo0Pg@mail.gmail.com \
--to=artagnon@gmail.com \
--cc=zsh-users@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).