From 45a292bc4420baf11843bc9a0fb3be61fe47a36a Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Sun, 4 Dec 2016 14:13:14 -0800 Subject: [PATCH] Add bash completion for `docker version --format` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 63b1b2e653..14a362fa81 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -3690,9 +3690,15 @@ _docker_top() { } _docker_version() { + case "$prev" in + --format|-f) + return + ;; + esac + case "$cur" in -*) - COMPREPLY=( $( compgen -W "--help" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "--format -f --help" -- "$cur" ) ) ;; esac }