prompt_opts=( cr sp percent subst )
- # TODO: check for color terminal. never will use B&W term but still a XXX
+ # XXX: no checks for color terminal or if escapes work, except for echotc
local m n p s r c d u
#TODO remove n?
m=${1:-2line} # Mode
# [AC]CURSED COMMAND
# concatenate the numerical values of each letter of the hostname,
# moduloing by the number of possible colors.
+ x=$(echotc Co)
+ [[ -z $x ]] && x=8
local generated=$(uname -n | od -An -td1 | awk -F' ' \
"{for (i=1; i<=NF; i++) {sum+=1; sum*=\$i; sum%=$(echotc Co)} print sum}")
[[ $p = random ]] && p=$generated