Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completing second argument of cd
- X-seq: zsh-users 322
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: schaefer@xxxxxxx
- Subject: Re: completing second argument of cd
- Date: Mon, 22 Jul 1996 20:11:25 +0200 (MET DST)
- Cc: pws@xxxxxx, zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <960722092318.ZM8604@xxxxxxxxxxxxxxxxxxxxxxx> from Bart Schaefer at "Jul 22, 96 09:23:18 am"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> On Jul 22, 4:59pm, Zoltan Hidvegi wrote:
> } Subject: Re: completing second argument of cd
> }
> } Have a look at Misc/compctl-examples and Functions/cdmatch2.
>
> These examples would be a lot more helpful if they included some comments
> explaining which of zsh's baroque parameter manipulation features they are
> (ab)using, and why. It's pretty obvious that Peter's function and Zoltan's
> are both doing the same basic thing; but I have NO idea what reply[(r)]
> in Zoltan's version means, since according to the documentation the (r)
> should be followed by a pattern.
There is a pattern, don't you see that :-) ? There is an empty pattern.
The
[[ ${#reply[(r),-1]} != 0 ]] && reply[(r)]="''"
line just replaces an empty array element with a '' since zle_tricky does
not properly quotes empty strings. Unfortunately replacing the empty sring
to '' in quotename() does not help since it messes up completion if there
is an empty string in the list.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author