summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-01-10 17:31:06 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-01-10 23:17:32 +0900
commit6d92077e39acab9ef1e257a8e0cd8dd8b2bd3136 (patch)
tree2483a0bc52090efc974c85879073d0589d31533d /shell-completion
parentee156e8d881a3d98c4a893160604ca8eeed0cd2a (diff)
bash-completion: machinectl: add missing options and verbs
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/machinectl19
1 files changed, 15 insertions, 4 deletions
diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl
index 7865a99882..30cf9448e5 100644
--- a/shell-completion/bash/machinectl
+++ b/shell-completion/bash/machinectl
@@ -36,13 +36,17 @@ _machinectl() {
local i verb comps
local -A OPTS=(
- [STANDALONE]='--all -a --full --help -h --no-ask-password --no-legend --no-pager --version'
- [ARG]='--host -H --kill-who -M --machine --property -p --signal -s'
+ [STANDALONE]='--all -a -l --full --help -h --no-ask-password --no-legend --no-pager --version --value
+ --mkdir --read-only --force -q --quiet'
+ [ARG]='--host -H --kill-who -M --machine --property -p --signal -s --uid -E --setenv -n --lines
+ -o --output --verify --format --max-addresses'
)
local -A VERBS=(
- [STANDALONE]='list list-images pull-tar pull-raw import-tar import-raw export-tar export-raw list-transfers cancel-transfer'
- [MACHINES]='status show start stop login shell enable disable poweroff reboot terminate kill copy-to copy-from image-status show-image clone rename read-only remove set-limit'
+ [STANDALONE]='list list-images clean pull-tar pull-raw list-transfers cancel-transfer'
+ [MACHINES]='status show start stop login shell enable disable poweroff reboot terminate kill bind copy-to copy-from
+ image-status show-image clone rename read-only remove set-limit export-tar export-raw'
+ [FILE]='import-tar import-raw'
)
_init_completion || return
@@ -73,6 +77,9 @@ _machinectl() {
--property|-p)
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 cat'
+ ;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0
@@ -91,6 +98,10 @@ _machinectl() {
elif __contains_word "$verb" ${VERBS[MACHINES]}; then
comps=$( __get_machines )
+
+ elif __contains_word "$verb" ${VERBS[FILE]}; then
+ comps=$(compgen -f -- "cur")
+ compopt -o filenames
fi
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )