Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Redirection Symbol After Completion
- X-seq: zsh-users 10508
- From: Scott Anderson <ee_in_co@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Redirection Symbol After Completion
- Date: Mon, 10 Jul 2006 16:30:07 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=qg58DAZY/G/rqFfGw7R+WEildCqlLrN6LU2MOi6qk8TQoifddty22sCcgGuGf58Dw26dD9Js/2MewUOR+yd49etvYCofb//lRNbRB+DMmYATJ75fBah0rW8gnG5INtZSz7od7fggCikkHMbxKruYPwY9/hMKf/g17BRdZt/gcTc= ;
- In-reply-to: <20060710141220.GA11832@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Reply-to: Scott Anderson <ee_in_co@xxxxxxxxx>
----- Original Message ----
From: Chris Johnson <cjohnson@xxxxxxxxxx>
To: zsh-users@xxxxxxxxxx
Sent: Monday, July 10, 2006 8:12:20 AM
Subject: Re: Redirection Symbol After Completion
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.
This is not working for me.
> ls
noname
> cat no<TAB>
completes the file as expected.
> cat noname<SPACE>
Then I type "|"
> cat noname cat noname|[-1]
Am I missing an option?
> echo $ZSH_NAME $ZSH_VERSION
zsh 4.3.2
> setopt
autocd
autopushd
nobeep
nobgnice
correct
extendedglob
extendedhistory
histfindnodups
histignorealldups
histignoredups
histnostore
histsavenodups
nohup
incappendhistory
interactive
interactivecomments
ksharrays
kshglob
monitor
nonomatch
numericglobsort
promptsubst
pushdignoredups
pushdminus
pushdsilent
sharehistory
shinstdin
shwordsplit
zle
Thanks in advance for the help.
Scott
Messages sorted by:
Reverse Date,
Date,
Thread,
Author