fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
f5ff9aac2
master
1# Completion for dive: https://github.com/wagoodman/dive 2 3# Builtin options and subcommands 4dive completion fish| source 5 6# Arguments 7function __fish_docker_or_podman_image_tags 8command -v docker> /dev/null 9set --local docker_status$status 10command -v podman> /dev/null 11set --local podman_status$status 12 13if test $docker_status -eq 0 && test $podman_status -eq 0 14docker images --format'{{.Repository}}:{{.Tag}}' 2> /dev/null| command grep -v'<none>' | sed 's#^#docker://#' 15podman images --format'{{.Repository}}:{{.Tag}}' 2> /dev/null| command grep -v'<none>' | sed 's#^#podman://#' 16else if test $docker_status -eq 0 17docker images --format'{{.Repository}}:{{.Tag}}' 2> /dev/null| command grep -v'<none>' 18else if test $podman_status -eq 0 19podman images --format'{{.Repository}}:{{.Tag}}' 2> /dev/null| command grep -v'<none>' 20end 21end 22complete -c dive -xa"(__fish_docker_or_podman_image_tags)"