highlightrepo
provides a filter to highlight repository directory in a path string.
$ pwd | highlightrepo
Used 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/highlightrepo
Download binary from here: https://github.com/bayashi/highlightrepo/releases
If you have golang environment:
go install github.com/bayashi/highlightrepo@latest
MIT License
Dai Okabayashi: https://github.com/bayashi