1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00

portablectl: add --extension to bash completion

(cherry picked from commit fa84c1ce00)
(cherry picked from commit ae12c1380b)
This commit is contained in:
Luca Boccassi 2023-04-25 16:45:06 +01:00 committed by Luca Boccassi
parent 1e8057fce7
commit 6ed30a20be

View File

@ -36,7 +36,7 @@ _portablectl() {
local -A OPTS=(
[STANDALONE]='-q --quiet --runtime --no-reload --cat --no-pager --no-legend
--no-ask-password --enable --now -h --help --version'
[ARG]='-p --profile --copy -H --host -M --machine'
[ARG]='-p --profile --copy -H --host -M --machine --extension'
)
local -A VERBS=(
@ -60,6 +60,10 @@ _portablectl() {
--machine|-M)
comps=$( __get_machines )
;;
--extension)
comps=$( compgen -A file -- "$cur" )
compopt -o filenames
;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0