zsh-users
 help / color / mirror / code / Atom feed
From: "Benjamin R. Haskell" <zsh@benizi.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: do not write certain commands to history file
Date: Wed, 25 Aug 2010 17:11:47 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.01.1008251702590.4535@hp> (raw)
In-Reply-To: <AANLkTineAz6oYU0jTMKRU7CP5nQ+WgDih+EhVhRBAqYr@mail.gmail.com>

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


  reply	other threads:[~2010-08-25 21:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25 19:26 Eric Smith
2010-08-25 19:46 ` Mikael Magnusson
2010-08-25 20:36   ` Eric Smith
2010-08-25 20:41     ` Mikael Magnusson
2010-08-25 20:55     ` Benjamin R. Haskell
2010-08-25 21:01       ` Mikael Magnusson
2010-08-25 21:11         ` Benjamin R. Haskell [this message]
2010-08-25 21:01       ` do not write certain commands to history file - solved Eric Smith
2010-08-26  8:10 ` do not write certain commands to history file Sebastian Stark
2010-08-26  8:28 ` Sebastian Stark

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=alpine.LNX.2.01.1008251702590.4535@hp \
    --to=zsh@benizi.com \
    --cc=mikachu@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).