fix fish completion; wrong image names bug; close #16672

Signed-off-by: Viktor Stanchev <me@viktorstanchev.com>
This commit is contained in:
Viktor Stanchev 2015-10-10 00:54:18 -07:00 committed by Tibor Vass
parent cbc9cbde21
commit dd91c424fa
1 changed files with 3 additions and 3 deletions

View File

@ -26,11 +26,11 @@ end
function __fish_print_docker_containers --description 'Print a list of docker containers' -a select function __fish_print_docker_containers --description 'Print a list of docker containers' -a select
switch $select switch $select
case running case running
docker ps -a --no-trunc | command awk 'NR>1' | command awk 'BEGIN {FS=" +"}; $5 ~ "^Up" {print $1 "\n" $(NF-1)}' | tr ',' '\n' docker ps -a --no-trunc | command awk 'NR>1' | command awk 'BEGIN {FS=" +"}; $5 ~ "^Up" {print $1 "\n" $(NF)}' | tr ',' '\n'
case stopped case stopped
docker ps -a --no-trunc | command awk 'NR>1' | command awk 'BEGIN {FS=" +"}; $5 ~ "^Exit" {print $1 "\n" $(NF-1)}' | tr ',' '\n' docker ps -a --no-trunc | command awk 'NR>1' | command awk 'BEGIN {FS=" +"}; $5 ~ "^Exit" {print $1 "\n" $(NF)}' | tr ',' '\n'
case all case all
docker ps -a --no-trunc | command awk 'NR>1' | command awk 'BEGIN {FS=" +"}; {print $1 "\n" $(NF-1)}' | tr ',' '\n' docker ps -a --no-trunc | command awk 'NR>1' | command awk 'BEGIN {FS=" +"}; {print $1 "\n" $(NF)}' | tr ',' '\n'
end end
end end