diff options
author | Luca Boccassi <bluca@debian.org> | 2023-04-25 17:45:06 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-26 01:35:20 +0200 |
commit | fa84c1ce00eb07f69a200322fc513fff226e444b (patch) | |
tree | 6bf0b9ce921f68081d668dbe0fc27d597378f41b /shell-completion/bash/portablectl | |
parent | Merge pull request #27409 from mrc0mmand/more-tests (diff) | |
download | systemd-fa84c1ce00eb07f69a200322fc513fff226e444b.tar.xz systemd-fa84c1ce00eb07f69a200322fc513fff226e444b.zip |
portablectl: add --extension to bash completion
Diffstat (limited to '')
-rw-r--r-- | shell-completion/bash/portablectl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/shell-completion/bash/portablectl b/shell-completion/bash/portablectl index 31601dceb2..30e5da4aa2 100644 --- a/shell-completion/bash/portablectl +++ b/shell-completion/bash/portablectl @@ -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 |