diff options
-rw-r--r-- | Completion/Builtins/_source | 10 |
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 |