From: "Bart Schaefer" <schaefer@brasslantern.com>
To: GoTaR <gotar@poczta.onet.pl>
Cc: zsh-users@sunsite.dk
Subject: Re: History
Date: Sat, 14 Sep 2002 21:22:40 +0000 [thread overview]
Message-ID: <1020914212240.ZM15353@candle.brasslantern.com> (raw)
In-Reply-To: <20020911114230.GA345@os>
On Sep 11, 1:42pm, GoTaR wrote:
}
} So removing from history is possible only by leading space, not by
} configurable pattern, is it right? :/
That is correct. There was some discussion several months ago of having
a pattern match for history exclusion, but it didn't lead to anything.
It is, however, possible to selectively insert into the history commands
that would otherwise be ignored. Try something like this:
setopt hist_ignore_space
alias cd=' builtin cd'
function preexec {
if [[ "$1" = 'cd '* && "$1" != 'cd "`echo '*'`"' ]]
then
print -s "$1" # explicitly add it to the history
# else it already will be in the history, so do nothing
fi
}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2002-09-14 21:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-10 17:30 History GoTaR
2002-09-10 19:25 ` History Paul Lew
2002-09-10 20:50 ` History Paul Ackersviller
2002-09-10 21:52 ` History Wayne Davison
2002-09-11 5:39 ` History GoTaR
2002-09-11 9:28 ` History Bart Schaefer
2002-09-11 11:42 ` History GoTaR
2002-09-11 18:05 ` History Roman Neuhauser
2002-09-14 21:22 ` Bart Schaefer [this message]
[not found] ` <20020915083631.GA334@os>
2002-09-16 6:08 ` History Bart Schaefer
-- strict thread matches above, loose matches on Subject: below --
1997-11-07 19:43 History Robert Vukovic
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=1020914212240.ZM15353@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=gotar@poczta.onet.pl \
--cc=zsh-users@sunsite.dk \
/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).