1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-12 08:58:20 +03:00

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

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
(cherry picked from commit 3eb329bfb5df8f5b6eba9cef195dff54b9ba0e4b)
(cherry picked from commit aff1099b0a4adb9dc7de20fb1914a80f80f88c21)
(cherry picked from commit 863a7bbfbffc7199af4f15887497c907c26a71c8)
This commit is contained in:
Arthur Zamarin 2024-04-26 12:10:26 +03:00 committed by Luca Boccassi
parent bea72118e7
commit 845f38a340

View File

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