Skip to content

Instantly share code, notes, and snippets.

@shiplu
Created March 16, 2018 11:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save shiplu/608ce9c8675fdb6da0f1dc1bf3b1cf55 to your computer and use it in GitHub Desktop.
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