From 3bf125fce3b98bd04a359a9294aed644a9c11f09 Mon Sep 17 00:00:00 2001 From: Ma Shimiao Date: Mon, 16 Mar 2015 19:02:53 +0800 Subject: [PATCH] fix wrong tab completion Signed-off-by: Ma Shimiao --- contrib/completion/bash/docker | 2 +- contrib/completion/fish/docker.fish | 2 +- contrib/completion/zsh/_docker | 16 +++------------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 5d48e02cf3..7b4a23f2c9 100755 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -943,11 +943,11 @@ _docker() { images import info - insert inspect kill load login + logout logs pause port diff --git a/contrib/completion/fish/docker.fish b/contrib/completion/fish/docker.fish index efee52f806..d3237588ef 100644 --- a/contrib/completion/fish/docker.fish +++ b/contrib/completion/fish/docker.fish @@ -16,7 +16,7 @@ function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand' for i in (commandline -opc) - if contains -- $i attach build commit cp create diff events exec export history images import info insert inspect kill load login logout logs pause port ps pull push restart rm rmi run save search start stop tag top unpause version wait + if contains -- $i attach build commit cp create diff events exec export history images import info inspect kill load login logout logs pause port ps pull push rename restart rm rmi run save search start stop tag top unpause version wait return 1 end end diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index 3215814313..28398f7524 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -270,11 +270,6 @@ __docker_subcommand () { {-q,--quiet}'[Only show numeric IDs]' \ ':repository:__docker_repositories' ;; - (inspect) - _arguments \ - {-f,--format=-}'[Format the output using the given go template]:template: ' \ - '*:containers:__docker_containers' - ;; (import) _arguments \ ':URL:(- http:// file://)' \ @@ -282,15 +277,10 @@ __docker_subcommand () { ;; (info) ;; - (import) + (inspect) _arguments \ - ':URL:(- http:// file://)' \ - ':repository:__docker_repositories_with_tags' - ;; - (insert) - _arguments '1:containers:__docker_containers' \ - '2:URL:(http:// file://)' \ - '3:file:_files' + {-f,--format=-}'[Format the output using the given go template]:template: ' \ + '*:containers:__docker_containers' ;; (kill) _arguments \