added SUDO_PS1 prompt variable

This commit is contained in:
2010-02-20 12:07:55 +02:00
parent 87bf0b1b0f
commit 7d563b0951
2 changed files with 9 additions and 2 deletions

View File

@@ -24,7 +24,11 @@ Edit your `~/.profile` or `~/.bash_profile` and add the following to the top:
export DOTBASH=~/.bash
source $DOTBASH/main.sh
PS1="\u@\h \w\[$txtcyn\]\$git_branch\[$txtrst\]\\$ "
export PS1="\u@\h \w\[$txtcyn\]\$git_branch\[$txtrst\]\\$ "
Optionally, if you want a nice pretty prompt when using `sudo -s`, also add this line:
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\[$txtcyn\]\$git_branch\[$txtrst\]\\$ "
## Configuring

View File

@@ -20,4 +20,7 @@ function find_git_branch {
PROMPT_COMMAND="find_git_branch; $PROMPT_COMMAND"
# Default Git enabled prompt
# PS1="\u@\h \w\[$txtcyn\]\$git_branch\[$txtrst\]\\$ "
# export PS1="\u@\h \w\[$txtcyn\]\$git_branch\[$txtrst\]\\$ "
# Default Git enabled root prompt (for use with "sudo -s")
# export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\[$txtcyn\]\$git_branch\[$txtrst\]\\$ "