diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2021-07-25 09:08:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2021-07-26 03:46:53 +0000 |
commit | 0861a2ffbea2812d95ac3f1cb7a1bc803ab8165c (patch) | |
tree | e2ac7461ca9fcc4418b5124c4ff6968167f73b2c /share/bash-completion/container | |
parent | Making previous container curl create script a container get script. (diff) | |
download | compute-tools-0861a2ffbea2812d95ac3f1cb7a1bc803ab8165c.tar.xz compute-tools-0861a2ffbea2812d95ac3f1cb7a1bc803ab8165c.zip |
Adding container get command.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'share/bash-completion/container')
-rw-r--r-- | share/bash-completion/container | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/share/bash-completion/container b/share/bash-completion/container index bc0281f..44a48e7 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -97,6 +97,28 @@ _container() esac ;; + get|g) + case "${prev}" in + -n|--name) + opts="$(cd /etc/compute-tools/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + + -s|--script) + opts="$(cd /usr/share/compute-tools/get-scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + + *) + opts="-n --name -c --capability -d --drop-capability -s --script -v --verbose -b --bind --bind-ro" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + esac + ;; + info) case "${prev}" in -n|--name) |