Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Various notes on KSH_GLOB



Hi,

I tried using KSH_GLOB instead of EXTENDED_GLOB recently (because I
really dislike the re-interpretation of ^. What's the benefit over
typing *~?)

However, I stumbled on some problems:

% zsh -f 
juno% zsh --version
zsh 5.0.2 (x86_64-unknown-linux-gnu)
juno% mkdir -p v/v/v/v/v
juno% setopt kshglob
juno% echo *(v|v)
v
juno% echo *(v)
zsh: unknown file attribute
juno% echo *(v|v/)
zsh: bad pattern: *(v|v/)
juno% setopt extendedglob
juno% echo (v/)# 
v/ v/v/ v/v/v/ v/v/v/v/ v/v/v/v/v/

I realize that both mksh and ksh93 neither support directory recursion
with *() (but this would be nice to have, IMO, at last with the explicit
/), which probably only makes this a documentation bug:

>>     *(...) Match any number of occurrences.  (Like `(...)#'.)

Thoughts?

(Perhaps I just need a widget to type \^ when I type ^ after whitespace...)
-- 
Christian Neukirchen  <chneukirchen@xxxxxxxxx>  http://chneukirchen.org



Messages sorted by: Reverse Date, Date, Thread, Author