1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-01 05:47:04 +03:00

portablectl: add --extension to bash completion

(cherry picked from commit fa84c1ce00eb07f69a200322fc513fff226e444b)
(cherry picked from commit ae12c1380b8ad05baee7b1391f76b1f80ac69e2a)
(cherry picked from commit 6ed30a20be172353e6ebd21e258af1a365cffef0)
This commit is contained in:
Luca Boccassi 2023-04-25 16:45:06 +01:00 committed by Luca Boccassi
parent 783885a98a
commit eeb91ba62e

View File

@ -35,7 +35,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=(
@ -59,6 +59,10 @@ _portablectl() {
--machine|-M)
comps=$( __get_machines )
;;
--extension)
comps=$( compgen -A file -- "$cur" )
compopt -o filenames
;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0