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

PATCH: _source



The source builtin was only completing for the current directory and .
was not included in the completion.

Could someone who has been tracking all the patches please check if
gdiff is still listed in _use_lo instead of _diff. I'd submit a patch
to move it but suspect that I'm out-of-date there.

Oliver Kiddle

--- Completion/Builtins/_source.bak	Mon Mar 13 12:54:34 2000
+++ Completion/Builtins/_source	Mon Mar 13 14:38:02 2000
@@ -1,8 +1,14 @@
-#compdef source
+#compdef source .
 
 if [[ CURRENT -ge 3 ]]; then
   compset -n 2
   _normal
 else
-  _files
+  if [[ -prefix */ && ! -o pathdirs ]]; then
+    _files
+  elif [[ $words[1] = . ]]; then
+    _files -W path
+  else
+    _files -W "(. $path)"
+  fi
 fi



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