### put all of this in .zshrc or try ". ~/zsh/klammer.zsh" in .zshrc COLORX="" COLOR0="" COLOR1="" COLOR2="" COLOR3="" COLOR4="" COLOR5="" COLOR6="" COLOR7="" COLOR8="" COLOR9="" COLOR10="" COLOROFF="" highlight() { line=$* i=0 j=0 strlen=$#line while [ $i -le $strlen ] ; do i=$[i+1] x=$line[$i] case $x in (\{) j=$[j+1] ; eval print -n $"COLOR$j"$"x"$"COLOROFF" ;; (\}) eval print -n $"COLOR$j"$"x"$"COLOROFF" ; j=$[j-1] ;; (*) print -n $x ;; esac done print $COLOROFF } screenclearx () { print -n '7' print local MYLINE="$LBUFFER$RBUFFER" highlight $MYLINE print -n '8' # print "${COLORX}Hit Enter to continue${COLOROFF}" # read -k } zle -N screenclearx bindkey "^Xl" screenclearx