diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-12-14 02:02:27 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-12-14 02:18:24 +0900 |
commit | fad73e9deb6b2ddc5bd171c754c960f4d2f0b062 (patch) | |
tree | 5c3d3b41f2c7419354c84d47bced41c423dec1e9 /shell-completion | |
parent | bash-completion: machinectl: support import-fs (diff) | |
download | systemd-fad73e9deb6b2ddc5bd171c754c960f4d2f0b062.tar.gz systemd-fad73e9deb6b2ddc5bd171c754c960f4d2f0b062.tar.bz2 systemd-fad73e9deb6b2ddc5bd171c754c960f4d2f0b062.zip |
bash-completion: machinectl: suggest arguments for --verify and --format
This also changes to use '--output=help' for suggesting arguments of
--output option.
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/machinectl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl index 7c6337076..802a26260 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") ) |