 
     @cli.on 'history', (item) =>
       if item.length > 0 and item isnt 'exit' and item isnt 'history'
-        fs.appendFile '.hubot_history', "#{item}\n", (err) =>
+        fs.appendFile historyPath, "#{item}\n", (err) =>
           @robot.emit 'error', err if err
 
     @cli.on 'close', () =>

         @shutdown()

  loadHistory: (callback) ->
    fs.exists '.hubot_history', (exists) ->
      if exists
        instream = fs.createReadStream('.hubot_history')
        outstream = new stream
        outstream.readable = true
        outstream.writable = true

                parseInt(process.env.HUBOT_SHELL_HISTSIZE)
              else
                1024

historyPath = ".hubot_history"

class Shell extends Adapter
  send: (envelope, strings...) ->
