     filterKey = @getFilterKey()
     filter = (items, pattern) ->
       _.filter items, (item) ->
-        if filterKey of item
-          item[filterKey].match(///#{pattern}///i)
-        else
-          # When item has no filterKey, it is special, always displayed.
-          true
+        item.skip or item[filterKey].match(///#{pattern}///i)
 
     for pattern in words.map(_.escapeRegExp)
       items = filter(items, pattern)
 
-    nonHeaderItems = _.filter items, (item) -> not item.header?
-    filePaths = _.uniq(_.pluck(nonHeaderItems, "filePath"))
-    projectNames = _.uniq(_.pluck(nonHeaderItems, "projectName"))
+    normalItems = _.filter(items, (item) -> not item.header?)
+    allFilePaths = _.uniq(_.pluck(normalItems, "filePath"))
+    allProjectNames = _.uniq(_.pluck(normalItems, "projectName"))
 
     items = _.filter items, (item) ->
       if item.header?
         if item.projectHeader
-          item.projectName in projectNames
+          item.projectName in allProjectNames
         else
-          item.filePath in filePaths
+          item.filePath in allFilePaths
       else
         true
-
     items
 
   viewForItem: (item) ->
-    unless item.text?
+    if item.header?
       item.header
     else
       {text, point} = item

    new Promise (resolve) =>
      onFinish = (code) =>
        finished++
        if finished is projects.length
          resolve(@items)
          console.log "#{finished} finished"
        else
          console.log "#{finished} yet finished"

      pattern = _.escapeRegExp(@options.word)
      for project, i in projects
        onData = @outputterForProject(project, @items)
        @searchersRunning.push(@search(pattern, {cwd: project, onData, onFinish}))

  runCommand: ({command, args, options, onData, onFinish}) ->
    stdout = (output) -> onData({data: output})


  outputterForProject: (project, items) ->
    projectName = path.basename(project)
    console.log "CALLED for #{projectName}"
    projectHeaderAdded = false
    currentFile = null
    ({data}) =>
      unless projectHeaderAdded?
        items.push({header: '# ' + projectName, projectName, projectHeader: true, skip: true})
        projectHeaderAdded = true

      lines = data.split("\n")

      for line in lines when item = @parseLine(line)
        {relativePath} = item
        fullPath = path.join(project, relativePath)

        if currentFile isnt relativePath
          currentFile = relativePath
          headerItem = {header: "  # " + currentFile, projectName, filePath: fullPath, skip: true}
          items.push(headerItem)

        item.filePath = fullPath
