mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 12:13:33 +08:00
portablectl: add --extension to bash completion
This commit is contained in:
parent
ff2da67b9a
commit
fa84c1ce00
@ -36,7 +36,7 @@ _portablectl() {
|
|||||||
local -A OPTS=(
|
local -A OPTS=(
|
||||||
[STANDALONE]='-q --quiet --runtime --no-reload --cat --no-pager --no-legend
|
[STANDALONE]='-q --quiet --runtime --no-reload --cat --no-pager --no-legend
|
||||||
--no-ask-password --enable --now -h --help --version'
|
--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=(
|
local -A VERBS=(
|
||||||
@ -60,6 +60,10 @@ _portablectl() {
|
|||||||
--machine|-M)
|
--machine|-M)
|
||||||
comps=$( __get_machines )
|
comps=$( __get_machines )
|
||||||
;;
|
;;
|
||||||
|
--extension)
|
||||||
|
comps=$( compgen -A file -- "$cur" )
|
||||||
|
compopt -o filenames
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user