-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stops triggering precmd every once in a while #30
Comments
So I've found that I can cause this issue to happen every time I do |
OK narrowed it down even further to this specific command: export PROMPT_COMMAND='history -a' # record each line as it gets issued But I'm not sure yet why this is causing an issue. Any ideas? |
I've fixed the issue (I believe) by just executing |
Hey Mark, Thanks for opening! Looks like it was related to your configuration like #29 with interfering with Closing this. Please feel free to reopen if you're still having issues. Thanks! |
So I've noticed that every once in a while (it seems random, although maybe we'll discover there's something I'm doing that's causing this problem), my shell will stop updating the prompt (PS1)
I use https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh in order to display git branch information within my prompt and so this is where I usually first notice the issue of
precmd
not being executed as I'll switch between branches and find the branch name stays the same. But unfortunately that means the issue could have occurred at some earlier point in time.The reason I believe it's
precmd
not being triggered, is I adding in anecho
to see what it was doing and I found it was no longer showing the echo and so subsequently I presume no longer calling myprompt
function which sets the PS1.I've tried unsetting PS1 manually and then setting it again (pretty much as my
prompt
function does). I've tried using thereset
command orsource ~/.bashrc
andsource ~/.bash-preexec.sh
(also triedsource ~/.git-prompt.sh
in case that was having issues). But no luck in gettingprecmd
to start running again.The only thing I'm able to do is to open a new terminal tab and then move back in the directory I was just in and then close the original tab I had open :-(
Any help you can give me in identifying what part of my bashrc might be causing the issue would be appreciated.
The text was updated successfully, but these errors were encountered: