Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Redirection Symbol After Completion
- X-seq: zsh-users 10506
- From: Chris Johnson <cjohnson@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Redirection Symbol After Completion
- Date: Mon, 10 Jul 2006 10:12:20 -0400
- In-reply-to: <060708105612.ZM8718@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200607081145.k68BiwEY023823@xxxxxxxxxxxxxxxxx> <060708105612.ZM8718@xxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer sent me the following 1.9K:
> } > I personally find commands easier to parse with my eye when the space
> } > remains before the redirection symbol:
> } >
> } > cat file.txt |
> } >
> } > Is there any way to force this space to persist even if I type a
> } > redirection operator?
>
> self-insert-redir() {
> integer l=$#LBUFFER
> zle self-insert
> (( $l >= $#LBUFFER )) && LBUFFER[-1]=" $LBUFFER[-1]"
> }
> zle -N self-insert-redir
> for op in \| \< \> \&
> do bindkey "$op" self-insert-redir
> done
>
> I like that so much I might even keep it.
I like it too. Thanks so much, Bart!
--
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author