   getCompletion: (text) ->
     @runCmd "complete #{text} Project"
       .then (output) =>
-        (@getList output).map @trimQuote
+        regex = /\(([^,]+), ([^,]+), ([^,]+)\)(,|$)/g
+        results = []
+        XRegExp.forEach(output, regex, (match) ->
+          results.push
+            module: match[1]
+            ident: match[2]
+            type: match[3]
+        )
+        results
 
   getType: (text) ->
     @runCmd "typeLookup #{text}"

{BufferedProcess} = require 'atom'

class PscIde
  constructor: ->

      else
        @getCompletion prefix
          .then (completions) =>
            resolve completions.map (c) =>
              text: c.ident
              displayText: c.ident + ": " + @abbrevType c.type
              description: c.type
              type: if /->/.test(c.type) then "function" else "value"

module.exports = PscIde
