Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: do not write certain commands to history file
- X-seq: zsh-users 15332
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: do not write certain commands to history file
- Date: Wed, 25 Aug 2010 17:11:47 -0400 (EDT)
- Cc: zsh-users@xxxxxxx
- In-reply-to: <AANLkTineAz6oYU0jTMKRU7CP5nQ+WgDih+EhVhRBAqYr@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20100825192608.GG11622@xxxxxxxxxxxxx> <AANLkTimkMhrSeX6VpDBbMxO-VdMOr4n-0qsF==xBPjNd@xxxxxxxxxxxxxx> <mailbox-6437-1282767733-460593@pepper> <alpine.LNX.2.01.1008251647000.4535@hp> <AANLkTineAz6oYU0jTMKRU7CP5nQ+WgDih+EhVhRBAqYr@xxxxxxxxxxxxxx>
On Wed, 25 Aug 2010, Mikael Magnusson wrote:
> On 25 August 2010 22:55, Benjamin R. Haskell wrote:
> > On Wed, 25 Aug 2010, Eric Smith wrote:
> >
> >> [...]
> >>
> >> zshaddhistory() {
> >> [...trimmed...]
> >>
> >> [[ [...trimmed...]
> >> && ${arg} != (*foobar*)
> >> ]]
> >> }
> >
> > Where are you setting $arg? Do you mean $line? or are you trying to
> > match *foobar* in $argv?
>
> What are you talking about?
See the portion of his original function I left above.
> There's no $arg anywhere, and no arrays. zshaddhistory() is passed
> the entire command line in a single argument.
Which is accessible via ${argv}, I suppose. But, yeah, overkill. I was
thinking of finding *foobar* in a general function's $argv.
--
Best,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author