Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: VMS Style auto command-complition
- X-seq: zsh-users 8240
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: VMS Style auto command-complition
- Date: Thu, 25 Nov 2004 12:31:41 -0800 (PST)
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <200411251946.iAPJklpi015080@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <1101407389.31116.9.camel@localhost> <200411251946.iAPJklpi015080@xxxxxxxxxxxxxx>
- Reply-to: zsh-users@xxxxxxxxxx
On Thu, 25 Nov 2004, Peter Stephenson wrote:
> autoload autoexec
> zle -N autoexec
> alias -A autoexpand accept-line
Er, surely you mean either
zle -N accept-line autoexec
or
zle -N autoexec
zle -A autoexec accept-line
> and deactivate it with
>
> alias -A .accept-line accept-line
zle -A .accept-line accept-line
> Instead of trying to execute a command and failing if it finds
> multiple possibilities, it outputs an error message underneath and
> allows you to edit the line again.
Which is also what my conditional-accept-line function does, BTW, though
it makes no effort to reposition the cursor for you.
> for hash in aliases reswords functions builtins commands; do
I like my "whence -w" a lot better here ... it's questionable in the next
loop whether forking "whence -m" is faster, but it's sure more obvious,
and doesn't require the parameter module.
> (( curpos = CURSOR ))
> BUFFER[1,$len]="$expn"
> (( curpos <= len )) && (( CURSOR = ${#expn[1]} ))
Hmm.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author