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

Shell options during completion?



I'm still getting up to speed writing completion functions, but I can't 
seem to tell the following:

Are completion functions called with some consistent set of shell 
options?  I'm writing a completion function for the VirtualBox 
utilities, and I'd included the following:

if [[ -o rematchpcre ]] ; then
# do something with pcre's
else
# (essentially) fall back to splitting on whitespace
# (unwritten during my personal testing)
fi

I wasn't getting things working quite right, and I was surprised to see 
that my _virtualbox file was the only match in:

$ grep -r rematchpcre ~/git/zsh/Completion

Is it a result of my question above (consistent options), or are 
completion functions generally written to assume the lowest common 
functionality?  (i.e. get by with POSIX extended regex)

-- 
Best,
Ben



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