about summary refs log tree commit diff
path: root/Completion/Builtins
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-13 16:57:38 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-13 16:57:38 +0000
commit336ba32a4322a9a50d597d724e33cb22658ed103 (patch)
treedb29b371e76fc79db3f407a9ccd3e40c66cd150a /Completion/Builtins
parent254a6e1c922b549f6de5b69c9e6a10ac35317c3d (diff)
downloadzsh-336ba32a4322a9a50d597d724e33cb22658ed103.tar.gz
zsh-336ba32a4322a9a50d597d724e33cb22658ed103.tar.xz
zsh-336ba32a4322a9a50d597d724e33cb22658ed103.zip
zsh-workers/10116
Diffstat (limited to 'Completion/Builtins')
-rw-r--r--Completion/Builtins/_source10
1 files changed, 8 insertions, 2 deletions
diff --git a/Completion/Builtins/_source b/Completion/Builtins/_source
index a232aa458..0447bee10 100644
--- a/Completion/Builtins/_source
+++ b/Completion/Builtins/_source
@@ -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