Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How could one prepend a string to every command?
- X-seq: zsh-workers 24374
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: How could one prepend a string to every command?
- Date: Wed, 9 Jan 2008 11:07:08 +0000 (UTC)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <c21da7250801090143q7d14698cn4c3c72271c208543@xxxxxxxxxxxxxx> <c21da7250801090144s3be41a09l91fc6f35c469ecbb@xxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxx>
Hi Ian,
"Ian Tegebo" <ian.tegebo@xxxxxxxxx> wrote:
> Is there any way zsh could prepend a string, e.g. '/usr/bin/env', to
> each command? I saw 'precmd' but I don't think that's what I want.
Maybe you can replace the accept-line widget.
accept-line()
{
BUFFER="/usr/bin/env $BUFFER"
zle .accept-line
}
zle -N accept-line
Bye, Jörg.
--
“Unfortunately, the current generation of mail programs do not have
checkers to see if the sender knows what he is talking about”
(Andrew S. Tanenbaum)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author