Skip to content

Commit

Permalink
Merge pull request dthree#295 from AdrieanKhisbe/permit-autocomplete-…
Browse files Browse the repository at this point in the history
…options

Permit autocomplete options
  • Loading branch information
milesj authored Feb 5, 2018
2 parents 604a966 + e7beb37 commit 2073ad9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ function getMatchData(input, cb) {
var cmd = input.match;
var midOption = String(string).trim().slice(0, 1) === '-';
var afterOption = input.option !== undefined;
if (midOption === true) {
if (midOption === true && !cmd._allowUnknownOptions) {
var results = [];
for (var i = 0; i < cmd.options.length; ++i) {
var long = cmd.options[i].long;
Expand Down
2 changes: 1 addition & 1 deletion lib/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ function getMatchData(input, cb) {
var cmd = input.match;
var midOption = (String(string).trim().slice(0, 1) === '-');
var afterOption = (input.option !== undefined);
if (midOption === true) {
if (midOption === true && (!cmd._allowUnknownOptions)) {
var results = [];
for (var i = 0; i < cmd.options.length; ++i) {
var long = cmd.options[i].long;
Expand Down

0 comments on commit 2073ad9

Please sign in to comment.