sindresorhus / pure

Pretty, minimal and fast ZSH prompt
MIT License
13.12k stars 971 forks source link

Proposal: Show Different Single Character for Different Index States #681

Open ghost opened 4 months ago

ghost commented 4 months ago

General information

System report (output of prompt_pure_system_report):

Rationale

I understand and support the reluctance to clutter the prompt, but as things currently stand, "local changes fully staged" and "unresolved merge conflicts" look exactly the same at a glance. Personally, I think that makes the status indicator not much more use than nothing at all.

Within the Pure philosophy, it isn't possible or desirable to display every detail of the repo state, but I believe we can show more than we currently are, without sacrificing aesthetic simplicity.

Proposal

I propose that instead of the * character Pure currently displays in all cases where the working tree differs from the current ref, it will instead display one of a selection of characters, depending on the first of these conditions to be satisfied:

And of course defaulting to no character at all.

This way, the user always knows the most pertinent issue to resolve in the current tree, and not a single extra character is used over status quo.

Musings

Further Reading

Issue #364 proposes a similar idea, but using multiple characters at once instead of one as described here.