From: Piotr Usewicz Date: Wed, 13 Oct 2010 10:24:10 +0000 (+0100) Subject: Add history saving for prompt X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=df20afc275bd5c48bb1de09e672a68beca455e1a;p=common%2Fbash_it.git Add history saving for prompt --- diff --git a/themes/pete/pete.theme.bash b/themes/pete/pete.theme.bash index 3186d9b..1f9b4fc 100644 --- a/themes/pete/pete.theme.bash +++ b/themes/pete/pete.theme.bash @@ -1,7 +1,16 @@ #!/bin/bash -# prompt themeing -PROMPT="(\t) \$(prompt_char) [\[$blue\]\u\[$normal_color\]@\[$green\]\h\[$reset_color\]] \[$yellow\]\w\[$reset_color\]\$(git_prompt_info)\$(rvm_version_prompt) \$\[$reset_color\] " +prompt_setter() { + # Save history + history -a + history -c + history -r + PS1="(\t) $(prompt_char) [\[$blue\]\u\[$reset_color\]@\[$green\]\H\[$reset_color\]] \[$yellow\]\w\[$reset_color\]$(git_prompt_info)$(rvm_version_prompt) $\[$reset_color\] " + PS2='> ' + PS4='+ ' +} + +PROMPT_COMMAND=prompt_setter GIT_THEME_PROMPT_DIRTY=" ✗" GIT_THEME_PROMPT_CLEAN=" ✓"