Prompt that autocompletes as you type. Can be used standalone or with a prompt system like enquirer
Install
Install with npm:
$ npm install --save prompt-autocompletion
Example usage
var states = 'Alabama' 'Alaska' 'American Samoa' ...;var AutoComplete = ;var autocomplete = type: 'autocomplete' name: 'from' message: 'Select a state to travel from' source: searchStates; // promiseautocomplete ; // or asyncautocomplete ; { return { ; };} { return { return input 'i' !== null; };}
Enquirer usage
var states = 'Alabama' 'Alaska' 'American Samoa' ...;var Enquirer = ;var enquirer = ; enquirer;var questions = type: 'autocomplete' name: 'from' message: 'Select a state to travel from' source: searchStates type: 'autocomplete' name: 'to' message: 'Select a state to travel to' source: searchStates ; enquirer ; { return { ; };} { return { return input 'i' !== null; };}
Prompts
Other prompt modules:
- prompt-checkbox: Multiple-choice/checkbox prompt. Can be used standalone or with a prompt system like Enquirer. | homepage
- prompt-confirm: Confirm (yes/no) prompt. Can be used standalone or with a prompt system like Enquirer. | homepage
- prompt-editor: Editor prompt. Opens your text editor and waits for you to save your input during… more | homepage
- prompt-expand: Expand prompt. Can be used as a standalone prompt, or with a prompt system like… more | homepage
- prompt-list: List-style prompt. Can be used as a standalone prompt, or with a prompt system like… more | homepage
- prompt-password: Password prompt. Can be used as a standalone prompt, or with a prompt system like… more | homepage
- prompt-radio: Radio prompt. This prompt behaves like other radio-button interfaces, where only one choice is enabled… more | homepage
- prompt-rawlist: Rawlist prompt. Can be used as a standalone prompt, or with a prompt system like… more | homepage
Attribution
This is entirely based on https://www.npmjs.com/package/inquirer-autocomplete-prompt Copyright (c) 2015, Martin Hansen martin@martinhansen.no
Thanks, Martin!
About
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for avice on opening issues, pull requests, and coding standards.
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.1.31, on October 13, 2016.