$PROMPT_COMMAND shouldn't get overwritten?
aseemk opened this issue · 1 comments
Hey there,
Thanks for the awesome bash prompt! I cherry-picked it on its own and really like it. (Discovered via https://github.com/sindresorhus/pure via https://twitter.com/moox/status/856517368528465920.)
After setting it up, I started hitting a bug where my new Terminal tabs would stop maintaining the current directory. After some sleuthing, it was this:
Indeed, $PROMPT_COMMAND
is currently overwritten by your code (link):
command -v git >/dev/null 2>&1 && PROMPT_COMMAND=prompt_command
So the fix was simple:
command -v git >/dev/null 2>&1 && PROMPT_COMMAND="prompt_command; $PROMPT_COMMAND"
It looks like this bash_prompt.bash
file no longer exists on master
, so I'm not sure if you care for this fix or not. Just thought I'd give back and share in case anyone else runs into this.
So thanks again and cheers!
That’s because I use zsh now ;-) Oh-my-zsh has its own prompt themes so probably this issue is already solved there. Here’s my current prompt: https://github.com/sapegin/dotfiles/blob/master/zsh/themes/squirrelbook.zsh-theme