aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/path.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bash_completion.d/path.bash')
-rw-r--r--bash/bash_completion.d/path.bash7
1 files changed, 5 insertions, 2 deletions
diff --git a/bash/bash_completion.d/path.bash b/bash/bash_completion.d/path.bash
index fcb57949..9aab8488 100644
--- a/bash/bash_completion.d/path.bash
+++ b/bash/bash_completion.d/path.bash
@@ -52,8 +52,11 @@ _path() {
IFS=: read -rd '' -a promptarr < <(printf '%s\0' "$PATH")
local part
for part in "${promptarr[@]}" ; do
- [[ $part == "${COMP_WORDS[COMP_CWORD]}"* ]] || continue
- COMPREPLY[${#COMPREPLY[@]}]=$(printf '%q' "$part")
+ case $part in
+ "${COMP_WORDS[COMP_CWORD]}"*)
+ COMPREPLY[${#COMPREPLY[@]}]=$(printf '%q' "$part")
+ ;;
+ esac
done
;;