Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Programmable completion bug in beta18
- X-seq: zsh-workers 1129
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: schaefer@xxxxxxxxxxxxxx
- Subject: Re: Programmable completion bug in beta18
- Date: Wed, 22 May 1996 21:26:20 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <960522114756.ZM12275@xxxxxxxxxxxxxxxxx> from "Barton E. Schaefer" at "May 22, 96 11:47:55 am"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> On May 22, 8:08pm, Zoltan Hidvegi wrote:
> } Subject: Re: Programmable completion bug in beta18
> }
> } > compctl -g '*(D-/)' cd
> } > {jagor}[0][~/hrv/zsh-2.6-beta18]$ cd [^D]
> } >
> } > ^D gives no output. TAB refuses to menu-complete. Shortly, it doesn't work.
> }
> } You need to set extended_glob for that.
>
> For what, specifically?
>
> } I think that extended_glob should be set by default when zsh is not called
> } as sh or ksh.
>
> There's a whole lot of extendedglob stuff that I don't normally want, so
> up through 2.5* I've not had it set. Under what circumstances is it now
> required where it was not required before?
In case of compctl, the pattern is stored as a string, and tokenize() is
called to tokenize it, the same function which is used for GLOB_SUBST. My
previous example was not really correct. The problem is that:
% foo='*(/)'
% echo $foo
If zsh is called as sh this should print the files ending in (/) instead of
the directories.
echo *(D-/) is syntactically incorrect under sh and it still works in zsh
without extended_glob. Everything is affected which uses tokenize()
internally. E.g. the builtin command arguments after -m only know *, ? and
[...]. Elternatives does not work line (foo|bar)*. Maybe some more
fine-grained control of glob behaviour is preferable. With sh (, | and )
are ordinary characters in glob patterns. Maybe we can keep the original
zsh behaviour and add a new option something like SH_GLOB wich does not
handle (, | and ) specially.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author