From: Yu Watanabe Date: Thu, 13 Dec 2018 17:02:27 +0000 (+0900) Subject: bash-completion: machinectl: suggest arguments for --verify and --format X-Git-Tag: v240~64^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fad73e9deb6b2ddc5bd171c754c960f4d2f0b062;p=thirdparty%2Fsystemd.git bash-completion: machinectl: suggest arguments for --verify and --format This also changes to use '--output=help' for suggesting arguments of --output option. --- diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl index 7c633707685..802a2626037 100644 --- a/shell-completion/bash/machinectl +++ b/shell-completion/bash/machinectl @@ -77,7 +77,13 @@ _machinectl() { comps='' ;; --output|-o) - comps='short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse json-seq cat with-unit' + comps=$( machinectl --output=help 2>/dev/null ) + ;; + --verify) + comps=$( machinectl --verify=help 2>/dev/null ) + ;; + --format) + comps='uncompressed xz gzip bzip2' ;; esac COMPREPLY=( $(compgen -W '$comps' -- "$cur") )