Files
dotfiles/completions/_docker-exec
Chen Asraf b7f0be95c5 feat: add docker-volume-(path|cd) commands
fix: rename _docker_completions to _docker-exec
2023-02-03 22:02:57 +00:00

16 lines
251 B
Plaintext
Executable File

#compdef docker-exec docker-bash docker-sh docker-log
names=($(docker ps --format "table {{.Names}}" | tail --lines=+2 | tr '\n' ' '))
if [[ -z $names ]]; then
return 1
fi
out=()
for i in $names; do
out+=("$i")
done
_describe 'container' out