summaryrefslogtreecommitdiffstats
path: root/share/bash-completion/container
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-06-06 13:57:35 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-06-29 11:19:35 +0000
commit2e67a52c2e1a25ce7b5a1b4e79bf31799079ae67 (patch)
tree205c303809658619addf0ec15b6f816b9a1b89aa /share/bash-completion/container
parentUsing cnt run to determine IP addresses in container list. (diff)
downloadcompute-tools-2e67a52c2e1a25ce7b5a1b4e79bf31799079ae67.tar.xz
compute-tools-2e67a52c2e1a25ce7b5a1b4e79bf31799079ae67.zip
Adding initial container info command.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'share/bash-completion/container')
-rw-r--r--share/bash-completion/container16
1 files changed, 16 insertions, 0 deletions
diff --git a/share/bash-completion/container b/share/bash-completion/container
index 540f162..cfa5740 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -97,6 +97,22 @@ _container()
esac
;;
+ info)
+ case "${prev}" in
+ -n|--name)
+ opts="$(container list -t -f shell)"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ opts="--status --os --ip"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+
key)
opts="-a --add -l --list -r --remove"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )