Skip to content

Instantly share code, notes, and snippets.

@shiplu

shiplu/goinside

Created Mar 16, 2018
Embed
What would you like to do?
Go inside docker container with same bash column height and width
goinside(){
docker exec -it $1 bash -c "stty cols $COLUMNS rows $LINES && bash";
}
_goinside(){
COMPREPLY=( $(docker ps --format "{{.Names}}" -f name=$2) )
}
export -f goinside
export -f _goinside
complete -F _goinside goinside
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment