prompt local vs remote
This commit is contained in:
parent
a735c0d758
commit
69c474427d
11
_bashrc
11
_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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user