diff options
| -rw-r--r-- | bash/.bashrc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bash/.bashrc b/bash/.bashrc index f76b1d9..b0087b2 100644 --- a/bash/.bashrc +++ b/bash/.bashrc | |||
| @@ -5,9 +5,19 @@ | |||
| 5 | # tty) see .bash_profile. something like the following may | 5 | # tty) see .bash_profile. something like the following may |
| 6 | # work: test -f ~/.bashrc && . ~/.bashrc | 6 | # work: test -f ~/.bashrc && . ~/.bashrc |
| 7 | 7 | ||
| 8 | if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then | ||
| 9 | SESSION_TYPE=ssh | ||
| 10 | fi | ||
| 11 | |||
| 8 | LC_ALL="en_US.UTF-8" | 12 | LC_ALL="en_US.UTF-8" |
| 9 | # This PS1 is completed at the end, allowing statuses to be included between the directory and closing $ | 13 | # This PS1 is completed at the end, allowing statuses to be included between the directory and closing $ |
| 10 | PS1="[\u@\[\e[38;5;148m\]\h\[\e[m\]:\[\e[36m\]\W\[\e[m\]\[\e[m\]]\[\e[m\]" | 14 | if [ "$SESSION_TYPE" == "ssh" ]; then |
| 15 | HOST_COLOR="\[\e[38;5;124m\]" | ||
| 16 | else | ||
| 17 | HOST_COLOR="\[\e[38;5;160m\]" | ||
| 18 | fi | ||
| 19 | |||
| 20 | PS1="[\u@${HOST_COLOR}\h\[\e[m\]:\[\e[36m\]\W\[\e[m\]\[\e[m\]]\[\e[m\]" | ||
| 11 | END_PS1="\$\[\e[m\] " | 21 | END_PS1="\$\[\e[m\] " |
| 12 | # This is the original PS1 | 22 | # This is the original PS1 |
| 13 | #PS1="[\u@\[\e[38;5;148m\]\h\[\e[m\]:\[\e[36m\]\W\[\e[m\]\[\e[m\]]\[\e[m\]\$\[\e[m\] " | 23 | #PS1="[\u@\[\e[38;5;148m\]\h\[\e[m\]:\[\e[36m\]\W\[\e[m\]\[\e[m\]]\[\e[m\]\$\[\e[m\] " |