diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-20 17:37:59 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-20 17:37:59 +1200 |
commit | 95f251851e81399ba6e54c7d5344ec10a0627bae (patch) | |
tree | b793ae41135a34b556f5dc0a699d9216b06fdd25 /bash/bash_completion.d | |
parent | Correct path() error messages (diff) | |
download | dotfiles-95f251851e81399ba6e54c7d5344ec10a0627bae.tar.gz dotfiles-95f251851e81399ba6e54c7d5344ec10a0627bae.zip |
Update path() completion
Diffstat (limited to 'bash/bash_completion.d')
-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 efead3c9..b8bdc6aa 100644 --- a/bash/bash_completion.d/path.bash +++ b/bash/bash_completion.d/path.bash @@ -6,7 +6,7 @@ _path() { # Complete operation as first word local cmd - for cmd in help list insert append remove set check ; do + for cmd in list insert append remove check help ; do [[ $cmd == "${COMP_WORDS[COMP_CWORD]}"* ]] || continue COMPREPLY[${#COMPREPLY[@]}]=$cmd done @@ -16,7 +16,7 @@ _path() { case ${COMP_WORDS[1]} in # Complete with a directory - insert|i|append|add|a|check|c|set|s) + insert|append|check) local dirname while IFS= read -rd '' dirname ; do COMPREPLY[${#COMPREPLY[@]}]=$dirname @@ -39,7 +39,7 @@ _path() { ;; # Complete with directories from PATH - remove|rm|r) + remove) local -a promptarr IFS=: read -d '' -a promptarr < <(printf '%s\0' "$PATH") local part |