Skip to content

Commit

Permalink
Add completion options
Browse files Browse the repository at this point in the history
  • Loading branch information
philclifford committed Feb 28, 2023
1 parent 5c4f48b commit 70b8747
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deb-get_completion
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ function _deb-get() {
elif [ "${COMP_CWORD}" -ge 2 ]; then
local command="${COMP_WORDS[1]}"

if [ "${COMP_CWORD}" = 2 ] && [ "${command}" = update ]; then
COMPREPLY=($(compgen -W "--repos-only" "\\${COMP_WORDS[2]}"))
if [ "${command}" = update ] && [ "${COMP_CWORD}" -le 3 ]; then
COMPREPLY=($(compgen -W "--repos-only --quiet" "\\${COMP_WORDS[${COMP_CWORD}]}"))
elif [ "${command}" = show ]; then
COMPREPLY=($(compgen -W "$(deb-get list --include-unsupported --raw | tr "\n" " ")" "${COMP_WORDS[${COMP_CWORD}]}"))
elif [ "${COMP_CWORD}" = 2 ] && [ "${command}" = search ]; then
Expand Down

0 comments on commit 70b8747

Please sign in to comment.