     stats.numberOfSearchedFiles = Object.keys(formatted).length
 
     # No results
-    if stats.numberOfMatches == 0
+    if stats.numberOfMatches is 0
       return @showWarning 'No results found, refine your search.'
 
     # Send results

      @formatOutput res.stdout, @bound 'createResultsView'

  escapeShell: (str) ->
    str.replace(/([\\"'`$\s\(\)<>])/g, "\\$1");

  formatOutput: (output, callback = noop) ->
    # Regexes
    MAIN_LINE = /^:?([\s\S]+):(\d+):([\s\S]*)$/
    CONTEXT_LINE = /^([\s\S]+)\-(\d+)\-([\s\S]*)$/

    lines      = output.split '\n'
    formatted  = {}
    stats      = {
      numberOfMatches: 0,
      numberOfSearchedFiles: 0
    }

    formatted = lines
    .map (line) ->

      return line.trimLeft()
    .filter (line) ->
      # Skip lines that aren't one of these
      return mainLineRegex.test(line) or contextLineRegex.test(line)
    .map (line) ->
      # Get the matches
      return line.match(mainLineRegex) or line.match(contextLineRegex)
    .reduce( (accu, matches) ->
      # Extract matches
      [fileName, lineNumber, line] = [matches[1], parseInt(matches[2], 10), matches[3]]
