           removeClass @statusIcon, 'status-running'
           @program = null
           addClass @statusIcon, code == 0 and 'status-success' or 'status-error'
-          showCmd()
+          @showCmd()
         @program.on 'error', (err) =>
           @cliOutput.append err.message
-          showCmd()
+          @showCmd()
           addClass @statusIcon, 'status-error'
         @program.stdout.on 'data', () =>
           @flashIconClass 'status-info'

      inputCmd.replace /("[^"]*"|'[^']*'|[^\s'"]+)/g, (s) ->
        args.push s
      cmd = args.shift()
      try
        @program = spawn cmd, args, stdio: 'pipe', env: process.env, cwd: atom.project.path
        @program.stdout.pipe htmlStream
        @program.stderr.pipe htmlStream
        removeClass @statusIcon, 'status-success'

        @subview 'cmdEditor', new EditorView(mini: true, placeholderText: 'input your command here')

  initialize: ->
    @cwd = atom.project.path
    atom.workspaceView.command "cli-status:toggle-output", =>
      @toggle()

