From 8b6d6fa9740051e8251a64cb068bae1fb805f414 Mon Sep 17 00:00:00 2001 From: Bret Fisher Date: Tue, 5 Dec 2017 01:03:25 -0500 Subject: [PATCH] Fixing zsh column finding in nodes and stacks. Signed-off-by: Bret Fisher --- contrib/completion/zsh/_docker | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index b25dc7b197..7703f3d9c1 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -1393,7 +1393,7 @@ __docker_nodes() { # Names if [[ $type = (names|all) ]]; then for line in $lines; do - s="${line[${begin[NAME]},${end[NAME]}]%% ##}" + s="${line[${begin[HOSTNAME]},${end[HOSTNAME]}]%% ##}" nodes=($nodes $s) done fi @@ -2169,9 +2169,9 @@ __docker_stacks() { end[${header[$i,$((j-1))]}]=-1 lines=(${lines[2,-1]}) - # Service ID + # Service NAME for line in $lines; do - s="${line[${begin[ID]},${end[ID]}]%% ##}" + s="${line[${begin[NAME]},${end[NAME]}]%% ##}" stacks=($stacks $s) done