If you are in a vcsh repo, display the repo name in the prompt
This commit is contained in:
parent
bbe83b3384
commit
2cd660a915
3
.bashrc
3
.bashrc
|
@ -66,6 +66,9 @@ awman() {
|
||||||
if [ -n "$SSH_CLIENT" ]; then
|
if [ -n "$SSH_CLIENT" ]; then
|
||||||
# Remotely, hostname is red.
|
# Remotely, hostname is red.
|
||||||
PS1="\[\033[38;5;4m\][\A]\[$(tput sgr0)\]\[\033[38;5;6m\][\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;14m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;6m\]@\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;1m\]\h\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;6m\] \W]\[$(tput sgr0)\]\[\033[38;5;7m\]\\$ \[$(tput sgr0)\]"
|
PS1="\[\033[38;5;4m\][\A]\[$(tput sgr0)\]\[\033[38;5;6m\][\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;14m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;6m\]@\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;1m\]\h\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;6m\] \W]\[$(tput sgr0)\]\[\033[38;5;7m\]\\$ \[$(tput sgr0)\]"
|
||||||
|
elif [ -n "$VCSH_REPO_NAME" ]; then
|
||||||
|
# If in a vcsh repo env, add repo name in magenta.
|
||||||
|
PS1="\[\033[38;5;12m\][\[$(tput sgr0)\]\[\033[38;5;4m\]\A\[$(tput sgr0)\]\[\033[38;5;12m\]]\[$(tput sgr0)\]\[\033[38;5;6m\][\[$(tput sgr0)\]\[\033[38;5;14m\]\u\[$(tput sgr0)\]\[\033[38;5;6m\]@\h \[$(tput sgr0)\]\[\033[38;5;13m\]$VCSH_REPO_NAME\[$(tput sgr0)\]\[\033[38;5;6m\] \W]\[$(tput sgr0)\]\[\033[38;5;15m\]\\$ \[$(tput sgr0)\]"
|
||||||
else
|
else
|
||||||
# Locally, hostname is cyan.
|
# Locally, hostname is cyan.
|
||||||
PS1="\[\033[38;5;4m\][\A]\[$(tput sgr0)\]\[\033[38;5;6m\][\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;14m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;6m\]@\h \W]\[$(tput sgr0)\]\[\033[38;5;7m\]\\$ \[$(tput sgr0)\]"
|
PS1="\[\033[38;5;4m\][\A]\[$(tput sgr0)\]\[\033[38;5;6m\][\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;14m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;6m\]@\h \W]\[$(tput sgr0)\]\[\033[38;5;7m\]\\$ \[$(tput sgr0)\]"
|
||||||
|
|
Loading…
Reference in New Issue