From 95f251851e81399ba6e54c7d5344ec10a0627bae Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 20 Aug 2016 17:37:59 +1200 Subject: Update path() completion --- bash/bash_completion.d/path.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bash/bash_completion.d') 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 -- cgit v1.2.3