diff --git a/_bashrc b/_bashrc index e11f353..7cc1044 100644 --- a/_bashrc +++ b/_bashrc @@ -104,6 +104,15 @@ prompt_root() echo -n "${WHITEB}$" fi } +prompt_remote() +{ + if [ -n "$SSH_CLIENT" ] + then + echo -n "${REDB}>>" + else + echo -n "${GREENB}))" + fi +} __ps1() { @@ -111,7 +120,7 @@ __ps1() ps1post="$2" PS1="$ps1pre$ps1post" } -PS1pre='"${REDB}>> ${WHITEB}(${WHITE}\u@${GREEN}\h${WHITEB}) ${BLUEB}\w${RESET}"' +PS1pre='"$(prompt_remote) ${WHITEB}(${WHITE}\u@${GREEN}\h${WHITEB}) ${BLUEB}\w${RESET}"' PS1post='"\n$(prompt_status)$(prompt_root)${RESET} "' PROMPT_COMMAND="__ps1 $PS1pre $PS1post"