about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-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