Add history saving for prompt

pull/12/head
Piotr Usewicz 2010-10-13 11:24:10 +01:00
parent cedc030b62
commit df20afc275
1 changed files with 11 additions and 2 deletions

View File

@ -1,7 +1,16 @@
#!/bin/bash #!/bin/bash
# prompt themeing prompt_setter() {
PROMPT="(\t) \$(prompt_char) [\[$blue\]\u\[$normal_color\]@\[$green\]\h\[$reset_color\]] \[$yellow\]\w\[$reset_color\]\$(git_prompt_info)\$(rvm_version_prompt) \$\[$reset_color\] " # 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_DIRTY=" ✗"
GIT_THEME_PROMPT_CLEAN=" ✓" GIT_THEME_PROMPT_CLEAN=" ✓"