reujab / silver

A cross-shell customizable powerline-like prompt with icons
MIT License
453 stars 30 forks source link

Use numbers to represent number of changes #4

Closed iilyak closed 5 years ago

iilyak commented 5 years ago

This is mostly a feature request not really a bug. IMO it would be better to use integers to represent number of changes from upstream. I work with codebases which can diverge significantly from upstream. Currently number of stashed changes is represented by n stash icons. Where n is number of changes (stashes += &icons::get("stash");). Same goes for ahead and behind

graph = icons::get("ahead").repeat(ahead)
+ &icons::get("behind").repeat(behind);

The problem with this approach is that it takes the screen space. It makes prompt taking few lines for some edge cases. It could be changed to show this info in colored sections like follows:

------\-----------------\----------------\------------------\
       > :stash_icon: 5  > :ahead_icon: 8 > :behind_icon: 10 >
------/-----------------/----------------/------------------/
iilyak commented 5 years ago

The cosmetics which could be used are:

reujab commented 5 years ago

I just released v1.0.4, which fixed this issue. No more than five icons should be displayed at a time.

iilyak commented 5 years ago

Thank you very much.