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

PATCH: glob flags at start of word



ls (#<TAB>

doesn't complete as globbing flags are treated as a special case of glob
qualifiers, which can't be completed here.

Fairly minor but I can't see any good reason not to fix it.

pws

diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files
index 2b0c558..d44ac31 100644
--- a/Completion/Unix/Type/_files
+++ b/Completion/Unix/Type/_files
@@ -17,6 +17,10 @@ if _have_glob_qual $PREFIX; then
     _globquals && ret=0
   fi
   return ret
+elif [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\(\#'; then
+  # Globbing flags can start at beginning of word, even though
+  # glob qualifiers can't.
+  _globflags && return
 fi
 
 local opts tmp glob pat pats expl tag i def descr end ign tried




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