(navigate) fixed path completions for book add

This commit is contained in:
2026-04-13 09:24:38 +02:00
parent 6e0ea60a1e
commit b8b04f7f2b
+4 -2
View File
@@ -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