🐳 A curated list of delicious docker recipes 🇺🇦🇮🇱 (Let's Fight Against Dictatorship)
See the codeA collection of delicious docker recipes.
#!/bin/bash
#
# handy auto-completion for docker-exec
#
enter() {
local name=${1:?}
docker exec -it $name sh -c 'exec $(command -v bash || command -v sh)'
}
__enter() {
local cur=${COMP_WORDS[COMP_CWORD]}
for cid in $(docker ps -q)
do
local name=$(docker inspect -f '{{.Name}}' $cid)
name=${name#/}
if [[ $name = $cur* ]]
then
COMPREPLY+=("$name")
fi
done
}
complete -F __enter enter
1,801 followers · starred Aug 2019
5,048 followers · starred Oct 2017
119 followers · starred Jan 2022
69 followers · starred Aug 2020
🐳 A curated list of delicious docker recipes 🇺🇦🇮🇱 (Let's Fight Against Dictatorship)
See the codeA collection of delicious docker recipes.
#!/bin/bash
#
# handy auto-completion for docker-exec
#
enter() {
local name=${1:?}
docker exec -it $name sh -c 'exec $(command -v bash || command -v sh)'
}
__enter() {
local cur=${COMP_WORDS[COMP_CWORD]}
for cid in $(docker ps -q)
do
local name=$(docker inspect -f '{{.Name}}' $cid)
name=${name#/}
if [[ $name = $cur* ]]
then
COMPREPLY+=("$name")
fi
done
}
complete -F __enter enter
1,801 followers · starred Aug 2019
5,048 followers · starred Oct 2017
119 followers · starred Jan 2022
69 followers · starred Aug 2020