diff --git a/README.md b/README.md index b6b25ed..021ae6c 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ end of the same file you pasted the installation code into earlier. #### Mac OS X ```bash -export PS1="\u@\h \W \[\$txtcyn\]\$git_branch\[\$txtred\]\$git_dirty\[\$txtrst\]\$ " +export PS1="\u@\h \W\${git_branch:+ \[\$txtcyn\]\$git_branch\[\$txtred\]\$git_dirty}\[\$txtrst\]\$ " ``` Optionally, if you want a nice pretty prompt when using `sudo -s`, also add @@ -81,19 +81,19 @@ export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ " Standard: ```bash -export PS1="\${debian_chroot:+(\$debian_chroot)}\u@\h:\w \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ " +export PS1="\${debian_chroot:+(\$debian_chroot)}\u@\h:\w\${git_branch:+ \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty}\[$txtrst\] \$ " ``` Colorized: ```bash -export PS1="\${debian_chroot:+(\$debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ " +export PS1="\${debian_chroot:+(\$debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\${git_branch:+ \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty}\[$txtrst\] \$ " ``` #### Windows ```bash -export PS1="\[\033]0;$MSYSTEM:\w\007\033[32m\]\u@\h:\[\033[33m\w \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\033[0m\]\$ " +export PS1="\[\033]0;$MSYSTEM:\w\007\033[32m\]\u@\h:\[\033[33m\w\${git_branch:+ \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty}\[$txtrst\] \033[0m\]\$ " ``` ## Updating