From 8cc74becc08c9e4f2734de6f26ff67398c2ee9f2 Mon Sep 17 00:00:00 2001 From: Jesus de Mula Cano Date: Mon, 7 Mar 2011 00:08:56 +0100 Subject: [PATCH] Fix demula theme output --- themes/demula/demula.theme.bash | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/themes/demula/demula.theme.bash b/themes/demula/demula.theme.bash index e8b3bc2..55be824 100644 --- a/themes/demula/demula.theme.bash +++ b/themes/demula/demula.theme.bash @@ -56,20 +56,13 @@ case $TERM in esac is_vim_shell() { - if [ ! -z "$VIMRUNTIME" ] + if [ ! -z "$VIMRUNTIME" ]; then echo "${D_INTERMEDIATE_COLOR}on ${D_VIMSHELL_COLOR}\ vim shell${D_DEFAULT_COLOR} " fi } -demula_battery_charge() { - if [ ! -z "$(battery_charge)" ] - then - battery_charge - fi -} - mitsuhikos_lastcommandfailed() { code=$? if [ $code != 0 ]; @@ -81,7 +74,7 @@ $code ${D_DEFAULT_COLOR}" # vcprompt for scm instead of bash_it default demula_vcprompt() { - if [ ! -z "$VCPROMPT_EXECUTABLE" ] + if [ ! -z "$VCPROMPT_EXECUTABLE" ]; then local D_VCPROMPT_FORMAT="on ${D_SCM_COLOR}%s${D_INTERMEDIATE_COLOR}:\ ${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}" @@ -96,15 +89,15 @@ prompt() { local MOVE_CURSOR_RIGHTMOST='\[\033[500C\]' local MOVE_CURSOR_5_LEFT='\[\033[5D\]' - PS1="${TITLEBAR}\n\ + PS1="${TITLEBAR} ${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}\ -$(demula_battery_charge)${RESTORE_CURSOR}\ +$(battery_charge)${RESTORE_CURSOR}\ ${D_USER_COLOR}\u ${D_INTERMEDIATE_COLOR}\ at ${D_MACHINE_COLOR}\h ${D_INTERMEDIATE_COLOR}\ in ${D_DIR_COLOR}\w ${D_INTERMEDIATE_COLOR}\ $(mitsuhikos_lastcommandfailed)\ $(demula_vcprompt)\ -$(is_vim_shell)\n\ +$(is_vim_shell) ${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}" PS2="${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}" -- 2.17.1