diff options
Diffstat (limited to 'bash/bash_completion.d/path.bash')
-rw-r--r-- | bash/bash_completion.d/path.bash | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bash/bash_completion.d/path.bash b/bash/bash_completion.d/path.bash index 7143b448..8db6a74a 100644 --- a/bash/bash_completion.d/path.bash +++ b/bash/bash_completion.d/path.bash @@ -17,7 +17,7 @@ _path() { pop remove shift - ' -- "${COMP_WORDS[COMP_CWORD]}") + ' -- "$2") # Complete with either directories or $PATH entries as all other words else @@ -46,7 +46,7 @@ _path() { # Collect directory names, strip trailing slash local -a dirnames - dirnames=("${COMP_WORDS[COMP_CWORD]}"*/) + dirnames=("$2"*/) dirnames=("${dirnames[@]%/}") # Print quoted entries, null-delimited @@ -62,7 +62,7 @@ _path() { local part for part in "${promptarr[@]}" ; do case $part in - "${COMP_WORDS[COMP_CWORD]}"*) + "$2"*) COMPREPLY[${#COMPREPLY[@]}]=$(printf '%q' "$part") ;; esac |