diff --git a/scripts/navigate_bash_setup.sh b/scripts/navigate_bash_setup.sh index 4e12a33..dbe04fa 100644 --- a/scripts/navigate_bash_setup.sh +++ b/scripts/navigate_bash_setup.sh @@ -44,7 +44,9 @@ function _book { fi elif [[ COMP_CWORD -eq 3 ]]; then if [[ "${COMP_WORDS[1]}" = "add" ]]; then - COMPREPLY=($(compgen -o dirnames -- $CURRENT_WORD)) + temp=($(compgen -o dirnames -- $CURRENT_WORD)) + COMPREPLY=("${temp[@]/%//}") + unset temp fi fi } @@ -59,4 +61,4 @@ function _pop { complete -o dirnames push complete -F _pop pop -complete -F _book book +complete -o nospace -F _book book