From 1ba3574cefc5b9b56ea8456a9645a5723586334b Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sat, 6 Jun 2020 15:37:16 +0200 Subject: modified prompt --- bash/prompt.bash | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'bash') 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 -- cgit v1.2.3