Skip to content

Instantly share code, notes, and snippets.

@sevenmaxis
Last active November 4, 2020 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sevenmaxis/2c7352c17c2b1a42cd8e8431e6d5f23b to your computer and use it in GitHub Desktop.
Save sevenmaxis/2c7352c17c2b1a42cd8e8431e6d5f23b to your computer and use it in GitHub Desktop.
Automatically rename tmux window name for heroku session
heroku(){
windowname=$(tmux display-message -p '#W')
trap "{ tmux rename-window "$windowname" }" EXIT
tmux rename-window "heroku $*"
command heroku "$@"
tmux rename-window "$windowname"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment