From: oddjobsman Date: Wed, 27 Nov 2013 18:37:29 +0000 (+0530) Subject: Modified theme to use PROMPT_COMMAND instead of PS1 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=faa8b9127162177464d0a28e4dfdb685f415c51a;p=common%2Fbash_it.git Modified theme to use PROMPT_COMMAND instead of PS1 --- diff --git a/themes/sexy/sexy.theme.bash b/themes/sexy/sexy.theme.bash index 949dcca..15b9a97 100644 --- a/themes/sexy/sexy.theme.bash +++ b/themes/sexy/sexy.theme.bash @@ -40,4 +40,8 @@ parse_git_branch () { git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" } -PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]" +function prompt_command() { + PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]" +} + +PROMPT_COMMAND=prompt_command