Permalink
Browse files

Fix handling of command custom completion

  • Loading branch information...
1 parent dbe14aa commit 840e8cfc68c8c6f02388cc73e7071155d621b8ad @arikon arikon committed Oct 23, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/completion.js
  2. +1 −1 src/completion.coffee
View
@@ -107,7 +107,7 @@ complete = function(cmd, opts) {
}
}
if (cmd._comp) {
- compls = Q.join(compls, Q.when(cmd._comp(opts), function(c, o) {
+ compls = Q.join(compls, Q.when(cmd._comp(opts)), function(c, o) {
return c.concat(o);
}));
}
View
@@ -135,7 +135,7 @@ complete = (cmd, opts) ->
# custom completion on cmds
if cmd._comp
- compls = Q.join compls, Q.when cmd._comp(opts), (c, o) ->
+ compls = Q.join compls, Q.when(cmd._comp(opts)), (c, o) ->
c.concat o
# TODO: context aware custom completion on cmds, opts and args

0 comments on commit 840e8cf

Please sign in to comment.