(nav) added tab completion for book clean

This commit is contained in:
scbj
2026-01-30 08:54:37 +01:00
parent 0a28bcd191
commit 511494a0f9

View File

@@ -33,10 +33,12 @@ function navconfig {
function _book { function _book {
CURRENT_WORD=${COMP_WORDS[COMP_CWORD]} CURRENT_WORD=${COMP_WORDS[COMP_CWORD]}
if [[ COMP_CWORD -eq 1 ]]; then if [[ COMP_CWORD -eq 1 ]]; then
BOOKMARKS="add remove $(__call_navigate bookmark completions)" BOOKMARKS="add remove clean $(__call_navigate bookmark completions)"
COMPREPLY=($(compgen -W "${BOOKMARKS}" -- $CURRENT_WORD)) COMPREPLY=($(compgen -W "${BOOKMARKS}" -- $CURRENT_WORD))
elif [[ COMP_CWORD -eq 2 ]]; then elif [[ COMP_CWORD -eq 2 ]]; then
if [[ "${COMP_WORDS[1]}" = "remove" ]]; then if [[ "${COMP_WORDS[1]}" = "clean" ]]; then
unset COMPREPLY
elif [[ "${COMP_WORDS[1]}" = "remove" ]]; then
BOOKMARKS="$(__call_navigate bookmark completions)" BOOKMARKS="$(__call_navigate bookmark completions)"
COMPREPLY=($(compgen -W "${BOOKMARKS}" -- $CURRENT_WORD)) COMPREPLY=($(compgen -W "${BOOKMARKS}" -- $CURRENT_WORD))
fi fi