Skip to content

Commit

Permalink
- completions: incus: do all incus-related in incus completion func
Browse files Browse the repository at this point in the history
we had a separate non-incus source of the incus-needed completion
functions but so far nothing else needs this and probably won't ever, as
completions are usually standalone.  so make these happen in one place
  • Loading branch information
smemsh committed Dec 11, 2024
1 parent 6a4c14a commit 2806b6d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions init.d/completions
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,13 @@ shell_init_completions_incus ()

if [[ $(type -P incus) ]]
then
# from /usr/share/bash-completion/, incus completions expect
source init.d/completions.bash5
source <(incus completion bash) &>/dev/null \
&& complete -o default -F __start_incus incus sincus inc
fi
}

##############################################################################

(($BASH_VERSINFO >= 5)) && source init.d/completions.bash5

##############################################################################
#
# these are retained after we exit, used by the completion
Expand Down

0 comments on commit 2806b6d

Please sign in to comment.