(navigate) fixed path completions for book add
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user