From 5d08e610635660ff707d5be80fd4c010fa050bc0 Mon Sep 17 00:00:00 2001 From: Andreas Kreuzer Date: Fri, 17 Jun 2016 18:51:18 +0200 Subject: Adding bash-completion for container enter command. Signed-off-by: Andreas Kreuzer Signed-off-by: Daniel Baumann --- share/bash-completion/container | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'share/bash-completion') 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 -*) -- cgit v1.2.3