mirror of https://github.com/docker/cli.git
fix fish completion; wrong image names bug; close #16672
Signed-off-by: Viktor Stanchev <me@viktorstanchev.com>
This commit is contained in:
parent
cbc9cbde21
commit
dd91c424fa
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue