remove duplicate container fish completion

Signed-off-by: Tin Lai <oscar@tinyiu.com>
This commit is contained in:
Tin Lai 2020-06-07 21:16:17 +10:00
parent 8f14db8df2
commit cac9973955
No known key found for this signature in database
GPG Key ID: 3DFF94D0127B09D6
1 changed files with 4 additions and 4 deletions

View File

@ -26,16 +26,16 @@ end
function __fish_print_docker_containers --description 'Print a list of docker containers' -a select
switch $select
case running
docker ps -a --no-trunc --filter status=running --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
docker ps -a --no-trunc --filter status=running --format "{{.ID}}\t{{.Names}}" | tr ',' '\n'
case stopped
docker ps -a --no-trunc --filter status=exited --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
docker ps -a --no-trunc --filter status=exited --format "{{.ID}}\t{{.Names}}" | tr ',' '\n'
case all
docker ps -a --no-trunc --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
docker ps -a --no-trunc --format "{{.ID}}\t{{.Names}}" | tr ',' '\n'
end
end
function __fish_print_docker_networks --description 'Print a list of docker networks'
docker network ls --format "{{.ID}}\n{{.Name}}" | tr ',' '\n'
docker network ls --format "{{.ID}}\t{{.Name}}" | tr ',' '\n'
end