mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
shell completion: fix machinectl import-{tar,raw}
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
@@ -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") )
|
||||
|
||||
Reference in New Issue
Block a user