summaryrefslogtreecommitdiff
path: root/shell-completion/bash
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-12-14 02:02:27 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-12-14 02:18:24 +0900
commitfad73e9deb6b2ddc5bd171c754c960f4d2f0b062 (patch)
tree5c3d3b41f2c7419354c84d47bced41c423dec1e9 /shell-completion/bash
parent0e5bea97e9a4ae6d424f9bf147d8b2ae5406ac43 (diff)
downloadsystemd-fad73e9deb6b2ddc5bd171c754c960f4d2f0b062.tar.gz
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/bash')
-rw-r--r--shell-completion/bash/machinectl8
1 files changed, 7 insertions, 1 deletions
diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl
index 7c63370768..802a262603 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") )