Created
December 14, 2012 16:37
-
-
Save codeincontext/4286762 to your computer and use it in GitHub Desktop.
Make terminal text purple when ssh'ed into a server
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
# in remote ~/.bashrc | |
if [ -n "$SSH_CLIENT" ]; then text=" ssh" | |
fi | |
export PS1='\[\e[0;35m\]\u@\h:\w${text}$\[\e[m\] ' | |
# - Colour codes - | |
# Black 0;30 | |
# Dark Gray 1;30 | |
# Blue 0;34 | |
# Light Blue 1;34 | |
# Green 0;32 | |
# Light Green 1;32 | |
# Cyan 0;36 | |
# Light Cyan 1;36 | |
# Red 0;31 | |
# Light Red 1;31 | |
# Purple 0;35 | |
# Light Purple 1;35 | |
# Brown 0;33 | |
# Yellow 1;33 | |
# Light Gray 0;37 | |
# White 1;37 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment