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

Re: Help w/compctl & ksh_glob



On Aug 16,  2:59am, Jerry A! wrote:
} Subject: Help w/compctl & ksh_glob
}
} I'm trying to setup some simple completions under zsh 4.0.6 using
} 'compctl' and 'emulate ksh'.

Any particular reason you're not using compinit?

} compctl -/g '*.+(b{oo,ar,az}|quu|txt)' foo
                    ^^^^^^^^^^
The documentation for 'compctl -g' may have part of the answer:

     [...]  More than one pattern may be
     given separated by blanks. (Note that brace expansion is _not_
     part of globbing.  Use the syntax `(either|or)' to match
     alternatives.)

(Of course you need +(oo|ar|az) with KSH_GLOB set.)

However, the real problem is something to do with the SH_GLOB option,
which is set by 'emulate ksh'.  If I 'unsetopt SH_GLOB' then even as
(incorrectly) written your compctl offers me directories and .txt files.

This SH_GLOB problem doesn't affect globbing outside of compctl as far
as I can tell.



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