Open couloum opened 1 month ago
Hi @couloum. I know these context exist in prezto's git-info, but I think it's too much information and I prefer to keep it simple, like we try to keep it simple in zimfw.
(I was considering adding an unmerged context, so files with merge conflict show up in this context instead of both indexed and unindexed, but I'm still thinking it twice and didn't implement it yet.)
Any new context need to be used in at least a couple of our themes for it to make sense. Of course all these context proposed here could be added to the sorin theme. But I specially like how our fork of sorin is less poluted with symbols than the original prezto version.
EDIT: Also, these new context require the verbose mode, which makes the prompt slower when enabled, so we try to avoid it. In fact, only our forks of the steeef and sorin themes use it.
Thank you for your prompt answer. I understand the philosophy to have minimal and non-bloated framework. I currently use prezto and consider using zimfw especially for that. I do have created my own prompt in prezto that do contains these contexts. Therefore I added them for myself and suggested a PR to have this integrated mainstream. But I can leave with my own fork. It just felt to me that it was not a big addition considering that there's no additional command executed by the module. I didn't do benchmarks, but I would say that performance impact is negligible. And nobody is forced to use these. It's just a feature available for anyone wanting to use that their custom themes.
I let you decide whether or not you should validate this PR.
I'll leave this open to see if there's any interest in it.
You can always use prezto's git-info instead of ours with:
.zimrc
zmodule sorin-ionescu/prezto --root modules/git
zmodule git
.zshrc (on top)
zstyle ':prezto:module:git:alias' skip 'yes'
I suggest this PR to add support for the following new contexts:
These contexts are only available when verbose is set to
yes
.I used the same code letters than original prezto/git module for a better compatibility.
With this PR, we can have more information on the 'dirty' state as we now see the different reasons of why a repo is dirty.
Example of prompt: