robobenklein / zinc

A blazing-fast, pure ZSH, mixed asynchronous powerline prompt that's easily extensible and extremely configurable.
MIT License
35 stars 2 forks source link

Put commit hash in the prompt, when in detached mode #10

Open fniessen opened 5 years ago

fniessen commented 5 years ago

Dear Ben,

When in detached mode, could you put the commit hash in the prompt (instead of "heads/master")?

That was like that in PowerLevel9K, and was a time-saver…

Thanks in advance! Best regards, Fabrice

robobenklein commented 5 years ago

image

Am I thinking of something else?

fniessen commented 5 years ago

That would be it, indeed. Not sure to understand your question "Am I thinking of something else?", though.

FYI, I just do git checkout, not using the --detach option (which I wasn't aware of).

robobenklein commented 5 years ago

Hmmm I haven't been able to reproduce this issue, how did yours break?

fniessen commented 5 years ago

Hi Ben! Can't reproduce it anymore, in 2 different repos. So, forget about the fact it did not work…

Now, a small wish: it'd be good to have the first 7 figures and no "..." behind them, as I do have in a Git repo which is 10 years old -- where the default hash length is now auto-computed to 8 chars.

If you (can and will) do that, great! Otherwise, you can safely close this issue...