summary refs log tree commit diff
path: root/Completion/Builtins/_source
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-02-26 13:02:30 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-02-26 13:02:30 +0000
commit006e9b9afba10e2e64d86538fe5777376c8f0f57 (patch)
tree4cba2693f257bb5392faa929731bf5bcfdff8de0 /Completion/Builtins/_source
parent85de1eae0bbd3e94fa73cb56cb847d3edff99f59 (diff)
downloadzsh-006e9b9afba10e2e64d86538fe5777376c8f0f57.tar.gz
zsh-006e9b9afba10e2e64d86538fe5777376c8f0f57.tar.xz
zsh-006e9b9afba10e2e64d86538fe5777376c8f0f57.zip
change $words[1] to $service in some more places (13534)
Diffstat (limited to 'Completion/Builtins/_source')
-rw-r--r--Completion/Builtins/_source15
1 files changed, 11 insertions, 4 deletions
diff --git a/Completion/Builtins/_source b/Completion/Builtins/_source
index aae2c7320..96b6c21bd 100644
--- a/Completion/Builtins/_source
+++ b/Completion/Builtins/_source
@@ -1,7 +1,14 @@
-#defcomp source
+#compdef source .
 
-if [[ -position 2 -1 ]]; then
-  _normal "$@"
+if [[ CURRENT -ge 3 ]]; then
+  compset -n 2
+  _normal
 else
-  _files
+  if [[ -prefix */ && ! -o pathdirs ]]; then
+    _files
+  elif [[ $service = . ]]; then
+    _files -W path
+  else
+    _files -W "(. $path)"
+  fi
 fi