highlightrepo provides a filter to highlight repository directory in a path string.
$ pwd | highlightrepoUsed cyan to highlight by default. If you want to change, then add --color option.
$ pwd | highlightrepo --color="red"Here's color palette.
Use -y option in PS1 to bypass the check for non-tty output streams
PS1="\u \$(pwd | highlightrepo -y)\n\$ "brew tap bayashi/tap
brew install bayashi/tap/highlightrepoDownload binary from here: https://github.com/bayashi/highlightrepo/releases
If you have golang environment:
go install github.com/bayashi/highlightrepo@latestMIT License
Dai Okabayashi: https://github.com/bayashi
