All pastes #1196675 Raw Edit

Untitled

public text v1 · immutable
#1196675 ·published 2008-09-07 20:05 UTC
rendered paste body
alias mycol {
  set %mycolor $1
  echo  $+ %mycolor $+ mycolor set to $1 $+ .
}

alias setcolor {
  if (%color = plain) {
    set %color on
    echo setcolor - on.
  }
  elseif (%color = on) {
    set %color fuckyellow 
    echo setcolor - fuckyellow.
  }
  elseif (%color = fuckyellow) {
    set %color plain
    echo setcolor - plain.
  }
}

on *:input:*:{
  if (%color = on) {
    set %mycolor 10
    if (/* !iswm $1) && (!$ctrlenter) {
      var %message1  $+ %mycolor $+ $1-
      say %message1
      halt
    }
  }
  elseif (%color = fuckyellow) {
    set %mycolor $calc(%mycolor + 1)
    if (%mycolor = 8) {
      set %mycolor 9
    }
    if (%mycolor > 15) {
      set %mycolor 1
    }
    elseif (/* !iswm $1) && (!$ctrlenter) { 
      var %message1  $+ %mycolor $+ $1-
      say %message1 
      halt
    }
  }
}