 
     return
 
-  on: (name, func) ->
-    if typeof name is 'string' and typeof func is 'function'
-      @event[name] = func
-
-  trigger: (name, data) ->
-    if arguments.length is 2
-      if typeof name is 'string'
-        if data instanceof Array and typeof @event[name] isnt 'undefined'
-          @event[name].apply this, data
-
   encode: (input) ->
     bytes = (x) ->
       if typeof x is 'string'

  stdout: null
  argv: []
  event: {}

  constructor: (process) ->
    @process = process


        return output

    return new Buffer([0x1b].concat bytes(input))

  write: (input) ->
    if arguments.length <= 1
      @stdin.write input
    else
      inputs = Array.prototype.slice.call arguments
      inputs.forEach (input) ->
        @stdin.write input

  put: (code) ->
    input = @encode(code)
    if arguments.length <= 1
      @stdin.write input
    else
      @write @encode(Array.prototype.slice.call(arguments))

  set: (option, data) ->
    if typeof option is 'string' and typeof data isnt 'undefined'
      @options[option] = data

  on: (name, func) ->
    if typeof name is 'string' and typeof func is 'function'
      @event[name] = func


  trigger: (name, data) ->
    if arguments.length is 2
      if typeof name is 'string'
        if data instanceof Array and typeof @event[name] isnt 'undefined'
          @event[name].apply this, data
