1 Commits
master ... mac

Author SHA1 Message Date
505f6f67db bashrc: fix host-based prompt colors on Mac 2020-07-14 09:44:02 -07:00

View File

@@ -42,7 +42,7 @@ git_root() {
prompt_function() { prompt_function() {
prompt="" 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" HOST_COLOR="${RST}\001$(tput setaf $HOST_COLOR_ID)\002"
GIT_COLOR="${RST}${FG_CYN}" GIT_COLOR="${RST}${FG_CYN}"
DIR_COLOR="${RST}${FG_YEL}" DIR_COLOR="${RST}${FG_YEL}"