From ceee2175bdd2d8f10e556f2d80a6b926af91ea49 Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Wed, 18 Feb 2015 11:49:05 -0800 Subject: [PATCH] Add bash completion for `docker rename` Signed-off-by: Mike Dillon --- contrib/completion/bash/docker | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 670206ba12..cd09e4ba62 100755 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -552,6 +552,13 @@ _docker_push() { fi } +_docker_rename() { + local counter=$(__docker_pos_first_nonflag) + if [ $cword -eq $counter ]; then + __docker_containers_all + fi +} + _docker_restart() { case "$prev" in --time|-t) @@ -914,6 +921,7 @@ _docker() { ps pull push + rename restart rm rmi