zsh-users
 help / color / mirror / code / Atom feed
From: Phil Pennock <phil.pennock@globnix.org>
To: zsh-users@sunsite.dk
Subject: Re: Makeing history harmless
Date: Fri, 13 Oct 2006 11:16:03 +0200	[thread overview]
Message-ID: <20061013091603.GA27223@parhelion.globnix.org> (raw)
In-Reply-To: <20061012131521.GA8265@namib.cs.utk.edu>

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


      reply	other threads:[~2006-10-13  9:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-12  2:47 Meino Christian Cramer
2006-10-12  5:09 ` Phil Pennock
2006-10-12 13:15   ` Chris Johnson
2006-10-13  9:16     ` Phil Pennock [this message]

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=20061013091603.GA27223@parhelion.globnix.org \
    --to=phil.pennock@globnix.org \
    --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).