Skip to content

Commit

Permalink
correct abbrev with - in it
Browse files Browse the repository at this point in the history
  • Loading branch information
mklabs committed Jan 30, 2012
1 parent 9be6eba commit 0b51ad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/completion.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function cleanPrefix(s) {
}

function abbrev(o) { return function(it) {
return new RegExp('^' + o.last.replace(/-/g, '')).test(it);
return new RegExp('^' + o.last.replace(/^-/g, '')).test(it);
}}

// output the completion.sh script to the console for install instructions.
Expand Down

0 comments on commit 0b51ad8

Please sign in to comment.