diff --git a/iii.sh b/iii.sh index caa8e62..d729a1e 100755 --- a/iii.sh +++ b/iii.sh @@ -40,6 +40,13 @@ stty -echonl -echo tail -f -n "$h" "$i/$n/$c/out" | while read -r date time nick mesg; do case "$nick" in \<*\>) nick="${nick#<}" nick="${nick%>}"; printf '\a' ;; esac case "$mesg" in *$u*) date="$(tput setaf $l)$date" ;; esac + + # pretify special symbols around words + mesg="$(echo "$mesg" \ + | sed "s;\(^\|[[:space:]*_]\)/\([^[:space:]]*\)/\([_*[:space:]]\|$\);\1$(tput sitm)\2$(tput ritm)\3;g" \ + | sed "s;\(^\|[[:space:]*m]\)_\([^[:space:]]*\)_\([*[:space:]]\|$\);\1$(tput smul)\2$(tput rmul)\3;g" \ + | sed "s;\(^\|[[:space:]]\)\*\([^[:space:]]*\)\*\([[:space:]]\|$\);\1$(tput bold)\2$(tput sgr0)\3;g")" + # value between 1 and 14 - avoid black and white though there's 7 and 8 # based on the nick length and ascii code of the nick's first letter $r && clr="$(tput setaf $(( ((${#nick} + $(printf "%d" "'$nick")) % 14) + 1)))" || clr="$grn"