   grepEscapeRegExp: (str) -> str.replace /[[\]{}()*+?.,\\^$|#\s"']/g, '\\$&'
 
 
-  formatOutput: (machine, output, callback = kd.noop) ->
+  formatOutput: (output, callback = kd.noop) ->
 
     return @showWarning 'Something went wrong, please try again.', yes  if output.stderr
-
-    @machine = machine
 
     # Regexes
     mainLineRegex           = /^:?([\s\S]+):(\d+):([\s\S]*)$/


  createResultsView: (result, stats) ->

    {searchText}    = this
    isCaseSensitive = @caseToggle.getValue()
    resultsView     = new IDEContentSearchResultView { result, stats, searchText, isCaseSensitive, @machine }

    @emit 'ViewNeedsToBeShown', resultsView
    @destroy()


    command = "grep #{flags.join ' '} #{exclureDirs} --include=#{include} '#{searchText}' \"#{@escapeShell @rootPath}\""

    { machine } = @getData()
    machine.getBaseKite().exec({ command })
      .then  (res) => @formatOutput res.stdout, @bound 'createResultsView'
      .catch (err) =>
        @showWarning 'Something went wrong, please try again.'
        kd.warn err
