summaryrefslogtreecommitdiffstats
path: root/share/bash-completion
diff options
context:
space:
mode:
authorAndreas Kreuzer <andreas.kreuzer@open-infrastructure.net>2016-06-17 16:51:18 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-07-01 09:30:25 +0000
commit5d08e610635660ff707d5be80fd4c010fa050bc0 (patch)
treebe611e567a28afd9c37127e6f44c7abcd99fde30 /share/bash-completion
parentCorrecting container list manpage. (diff)
downloadcompute-tools-5d08e610635660ff707d5be80fd4c010fa050bc0.tar.xz
compute-tools-5d08e610635660ff707d5be80fd4c010fa050bc0.zip
Adding bash-completion for container enter command.
Signed-off-by: Andreas Kreuzer <andreas.kreuzer@open-infrastructure.net> Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'share/bash-completion')
-rw-r--r--share/bash-completion/container20
1 files changed, 20 insertions, 0 deletions
diff --git a/share/bash-completion/container b/share/bash-completion/container
index 1e5bf51..fafdd3c 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -80,6 +80,26 @@ _container()
esac
;;
+ enter)
+ case "${cur}" in
+ -*)
+ opts="-n --name"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ case "${prev}" in
+ -n|--name)
+ opts=$(container list -s -f short)
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
limit)
case "${cur}" in
-*)