mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-17 17:28:07 +00:00
16 lines
251 B
Plaintext
Executable File
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
|