Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Makeing history harmless
- X-seq: zsh-users 10857
- From: Phil Pennock <phil.pennock@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Makeing history harmless
- Date: Fri, 13 Oct 2006 11:16:03 +0200
- In-reply-to: <20061012131521.GA8265@xxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20061012.044715.74744338.Meino.Cramer@xxxxxx> <20061012050911.GA4764@xxxxxxxxxxxxxxxxxxxxx> <20061012131521.GA8265@xxxxxxxxxxxxxxxx>
- Sender: Phil Pennock <phil@xxxxxxxxxxxxx>
On 2006-10-12 at 09:15 -0400, Chris Johnson wrote:
> Phil Pennock sent me the following 0.9K:
> > On 2006-10-12 at 04:47 +0200, Meino Christian Cramer wrote:
> > > Is it possible to write a "something" to filter out certain commands
> > > or to modify certain commands before they were copied from the
> > > commandline into the history ?
> I do this with:
I do neither, I was just helping the OP, Meino. :^)
> setopt hist_ignore_space
> alias rm=' rm'
>
> Is there an advantage to using the widget?
Not really, unless you want to avoid global aliases whilst writing
something which can special-case things like "svn rm"; you could have
nested case statements examining different items in ${(z)BUFFER} and
possibly triggering other effects too. Heck, build a whole new dispatch
system for command hooks, a la compsys. ;^)
In summary, zsh is mighty and there's more than one way to do it.
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author