bashrc: fix host-based prompt colors on Mac

This commit is contained in:
2020-07-14 09:44:02 -07:00
parent f9535eab56
commit 505f6f67db

View File

@@ -42,7 +42,7 @@ git_root() {
prompt_function() {
prompt=""
HOST_COLOR_ID=$(( "16#$(hostname | md5sum | cut -f1 -d' ')" % 7 + 1)) # [1, 7]
HOST_COLOR_ID=$(( 16#$(hostname | md5 ) % 7 + 1 )) # [1, 7]
HOST_COLOR="${RST}\001$(tput setaf $HOST_COLOR_ID)\002"
GIT_COLOR="${RST}${FG_CYN}"
DIR_COLOR="${RST}${FG_YEL}"