Created
July 10, 2018 15:21
-
-
Save vertan/2422fb16c4225e7beb3f98c41737c1c6 to your computer and use it in GitHub Desktop.
Dynamic Badge depending on environment in iTerm/SSH
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
# Put this in ~/.ssh/config | |
Host *.production.host.net | |
LocalCommand echo -e "\033]50;SetProfile=Production\a" | |
Host *.staging.host.net | |
LocalCommand printf "\033]50;SetProfile=Staging\a\e[0;m" | |
Host * | |
PermitLocalCommand yes | |
# End ~/.ssh/config | |
# In iTerm2 | |
# 1. Create two new Profiles, "Production" and "Staging" | |
# 2. Keep defaults, but set Badge accordingly to "Production", "Staging" | |
# 3. (Optional) Set any other options for the specific environments. | |
# 4. Have fun in prod! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment