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>
(cherry picked from commit 3eb329b)
  • Loading branch information
arthurzam authored and keszybz committed May 8, 2024
1 parent a9227c9 commit aff1099
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 @@ -106,8 +106,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 aff1099

Please sign in to comment.