ohmybash / oh-my-bash

A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
https://ohmybash.github.io
MIT License
5.55k stars 626 forks source link

omb-prompt-base: do not attempt to process git vars outside a git tree #443

Closed jjmcdn closed 1 year ago

jjmcdn commented 1 year ago

I noticed this when checking out the n0qorg, being outside a git repository would have an undecorated detached: (from SCM_THEME_DETACHED_PREFIX) in the prompt. It's easy enough to correct this in the theme but since the problem also may be observed in hawaii50, iterate, pro, standard and zitron as well, and git rev-parse is fast to execute anyway, this seems to be the correct place to insert this quick check.

akinomyoga commented 1 year ago

Thanks!