From: Luca Boccassi Date: Tue, 25 Apr 2023 15:45:06 +0000 (+0100) Subject: portablectl: add --extension to bash completion X-Git-Tag: v254-rc1~631 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa84c1ce00eb07f69a200322fc513fff226e444b;p=thirdparty%2Fsystemd.git portablectl: add --extension to bash completion --- diff --git a/shell-completion/bash/portablectl b/shell-completion/bash/portablectl index 31601dceb29..30e5da4aa28 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