Skip to content

Commit

Permalink
Add option to search after autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
rizzlesauce committed Nov 19, 2019
1 parent c85f3b5 commit 3fae1cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ class AutocompletePrompt extends Base {
this.rl.write(ansiEscapes.cursorForward(autoCompleted.length));
this.rl.line = autoCompleted;
this.render();
if (this.opt.searchOnAutocomplete) {
this.search(autoCompleted);
}
}
} else if (keyName === 'down') {
len = this.currentChoices.length;
Expand Down

0 comments on commit 3fae1cb

Please sign in to comment.