Created
March 16, 2018 11:12
-
-
Save shiplu/608ce9c8675fdb6da0f1dc1bf3b1cf55 to your computer and use it in GitHub Desktop.
Go inside docker container with same bash column height and width
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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