summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:30:51 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:30:51 +0000
commit0c6cd454cc55c2b99d171b56da51318c6fc84f22 (patch)
tree79b4489ea648bf2f4ce6fcfbb78944b15b8ba429
parent7eb5ec3e7a9074a4083f4fda307ba1e4b140f0fb (diff)
downloadzsh-0c6cd454cc55c2b99d171b56da51318c6fc84f22.tar.gz
zsh-0c6cd454cc55c2b99d171b56da51318c6fc84f22.tar.xz
zsh-0c6cd454cc55c2b99d171b56da51318c6fc84f22.zip
moved from Completion/Builtins/_source
-rw-r--r--Completion/Zsh/Command/_source14
1 files changed, 14 insertions, 0 deletions
diff --git a/Completion/Zsh/Command/_source b/Completion/Zsh/Command/_source
new file mode 100644
index 000000000..96b6c21bd
--- /dev/null
+++ b/Completion/Zsh/Command/_source
@@ -0,0 +1,14 @@
+#compdef source .
+
+if [[ CURRENT -ge 3 ]]; then
+  compset -n 2
+  _normal
+else
+  if [[ -prefix */ && ! -o pathdirs ]]; then
+    _files
+  elif [[ $service = . ]]; then
+    _files -W path
+  else
+    _files -W "(. $path)"
+  fi
+fi