Skip to content

Commit

Permalink
shell completion: fix machinectl import-{tar,raw}
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
  • Loading branch information
arthurzam committed Apr 26, 2024
1 parent 35dcdca commit 3eb329b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shell-completion/bash/machinectl
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@ _machinectl() {
comps=$( __get_machines )

elif __contains_word "$verb" ${VERBS[FILE]}; then
comps=$(compgen -f -- "cur")
compopt -o filenames
if (( COMP_CWORD == i + 1 )); then # first argument after verb
comps=$(compgen -f -- "$cur")
compopt -o filenames
else
comps=''
fi
fi

COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
Expand Down

0 comments on commit 3eb329b

Please sign in to comment.