prompt bug fix
authorIan Kelling <ian@iankelling.org>
Sat, 24 May 2014 09:48:16 +0000 (02:48 -0700)
committerIan Kelling <ian@iankelling.org>
Thu, 4 May 2017 23:40:14 +0000 (16:40 -0700)
.bashrc

diff --git a/.bashrc b/.bashrc
index c88a065bfed4fbcf0238a9dc16cbcb9a6fbc04e3..3484db419a8711ecee8de73e02146346583518fb 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -179,7 +179,7 @@ mkdir() {
 alias d='builtin bg'
 complete -A stopped -P '"%' -S '"' d
 
-alias his='history'
+alias hi='history'
 
 
 # note: gksudo is recommended for X apps because it does not set the
@@ -896,7 +896,7 @@ if [[ $- == *i* ]]; then
                ps_color="$(get_term_color bold green)"
             fi
         fi
-        PS1="${PS1/%!(*[wW]*)}$(__git_ps1 ' (%s)') \[$ps_color\]$ps_char\[$(get_term_color nocolor)\] "
+        PS1="${PS1%"${PS1#*[wW]}"}$(__git_ps1 ' (%s)') \[$ps_color\]$ps_char\[$(get_term_color nocolor)\] "
     }
     PROMPT_COMMAND=prompt_command
 fi