aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash')
-rw-r--r--bash/prompt.bash12
1 files changed, 7 insertions, 5 deletions
diff --git a/bash/prompt.bash b/bash/prompt.bash
index 2510ea5..c4c77fc 100644
--- a/bash/prompt.bash
+++ b/bash/prompt.bash
@@ -2,11 +2,13 @@
function prompt_command () {
local EXIT="$?"
- if [ $EXIT -eq 0 ]; then
- EXIT=""
- fi
- #PS1="\n${cyan}\h:$(virtualenv_prompt) ${reset_color} ${yellow}\w ${green}$(scm_prompt_info)\n${red}${EXIT} ${reset_color}→ "
- PS1="\n${cyan}\h: ${reset_color} ${yellow}\w \n${red}${EXIT} ${reset_color}→ "
+ local REMOTE=""
+
+ [ $EXIT -eq 0 ] && EXIT=""
+ [ ! -z "$SSH_CONNECTION" ] && REMOTE="${orange}[R] "
+
+ #PS1="\n${REMOTE}${cyan}\h:$(virtualenv_prompt) ${reset_color} ${yellow}\w ${green}$(scm_prompt_info)\n${red}${EXIT} ${reset_color}→ "
+ PS1="\n${REMOTE}${cyan}\h: ${reset_color} ${yellow}\w \n${red}${EXIT} ${reset_color}→ "
}
PROMPT_COMMAND=prompt_command