What is the format for the -F option of _path_files and compadd?I'm passing several directories to _path_files:_path_files -W ($base_directories) -/But some of those directory trees I don't want to complete for this particular command.The documentation I can find for _path_files says it accepts a -F option—just like compadd, but I can't find the format to pass them in.Twiddling around hasn't been very fruitful either.I've tried, for example,_path_files -W ($base_directories) -/ -F shared; # shared still shows up_path_files -W ($base_directories) -/ -F (shared); # barfs on that guy
_path_files and compadd ignore-files parameter
zsh;autocomplete
That looks correct if you want to ignore shared at the root of the directory tree, i.e. if you're ignoring one of the $base_directories. But if you meant to ignore shared somewhere deeper in the hierarchy, you need -F (shared **shared). You can also put the patterns in an array, which will reduce the quoting pains.local -a ignored base_directoriesbase_directories=()ignored=(shared '*/shared')_path_files -W base_directories -/ -F ignoredThere are examples in the standard distribution in _cvs and _darcs.If this doesn't help, try investigating what's going on by adding set -x and set +x around the problematic code, or setopt local_options xtrace (a.k.a set -x and change options only for the duration of the current function).