shell completion: fix machinectl import-{tar,raw}

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
Arthur Zamarin
2024-04-26 12:10:26 +03:00
parent 35dcdca0ed
commit 3eb329bfb5

View File

@@ -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") )