aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-06-06 15:37:16 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-06-06 15:37:16 +0200
commit1ba3574cefc5b9b56ea8456a9645a5723586334b (patch)
tree7ddeb7379db7ff7869c059f99e2757c9de3f2a33 /bash
parent8f4088c3b3aea4a3539586dfd29e407469e27a1e (diff)
downloaddotfiles-1ba3574cefc5b9b56ea8456a9645a5723586334b.tar.gz
modified prompt
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