highlightrepo
highlightrepo
provides a filter to highlight repository directory in a path string.
Usage
$ pwd | highlightrepo
Used cyan to highlight. If you want to set another color, then add --color
option.
$ pwd | highlightrepo --color="red"
Here's color palette.
For PS1
Use -y
option in PS1
to bypass the check for non-tty output streams
PS1="[\u@\h \$(pwd | highlightrepo -y)]\n\$ "
Installation
Mac
brew tap bayashi/tap
brew install bayashi/tap/highlightrepo
Binary install
Download binary from here: https://github.com/bayashi/highlightrepo/releases
Go manual
If you have golang environment:
go install github.com/bayashi/highlightrepo@latest
License
MIT License
Author
Dai Okabayashi: https://github.com/bayashi