(Update: looks like it's related to #307)
I find git-info's auto-disable behavior confusing and too implicit. I'm referring to the case of Ctrl+C press while git-info is running.
Even though it prints a warning message once, it's easy to miss it. Happened to me, and I've also seen others with disabled-git-prompts, while they weren't aware to why it was actually disabled. The git prompt is very cool, and I believe that in many cases users don't want it to automatically go away.
I suggest to make the behavior more expected and explicit, that is:
1. Ctrl+C merely aborts the current call, doesn't modify settings, but displays an informative message.
2. Suggests running 'git-info off' to disable git prompt in current repo.
3. Suggests adding a zstyle setting to disable git prompt for all repos.
This way, the user is fully aware of the disable action.
Git-info: remove auto-disable-if-CTRL+C feature
Upon CTRL+C, instruct users on how to manually disable git prompt.
Git-info: add zstyle for disabling prompt for all repos
This might be useful for users who want to avoid the slow git-info call,
but want to keep the aliases. Updated CTRL + C message to indicate this option.
sounds consistent behaviour.
I'd prefer this behavior, too.
I made some changes on this subject in d5d03fa.
@sorin-ionescu Do you plan to merge this into master?
Yes, I will merge some form of this into master.
It's best to check the branches for code I'm toying with before opening issues or sending pull requests.
@sorin-ionescu I like your change at d503fa - it's more simple than mine; except I really think that the default settings should be auto-deactive='no'.
(Now comes the question whether or not to print a message to the user upon Ctrl+C, about the two disable methods. I'm not sure about it)
But either way I believe this should be opt-in rather than of opt-out.
(Good point about checking the branches before rushing to commit)