Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How could one prepend a string to every command?



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