We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v10.19.0
Linux 45-159-188-235 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
https://github.com/sullof/inquirer-command-prompt
import` inquirer from "inquirer"; import inquirerCommandPrompt from 'inquirer-command-prompt'; inquirer.registerPrompt('command', inquirerCommandPrompt) let arr=['users','rooms','help','user','handlers','handlers name']; async function runPrompt() { return inquirer.prompt([ { type: 'command', name: 'cmd', message: '>', short: true, validate: val => { if (val.endsWith(" ")) val = val.slice(0,-1); return val && arr[val] ? true : 'If you don\'t know the available commands, type help for help' }, // optional autoCompletion: arr, context: 0 } ]).then(answers => { if (answers.cmd.endsWith(" ")) answers.cmd = answers.cmd.slice(0,-1); const command = arr[answers.cmd]; console.log(command+" runned!"); if (answers.cmd !== 'quit' || answers.cmd !== 'exit' || answers.cmd !== "stop" || answers.cmd !== "rs") { return runPrompt(); } }).catch(err => { console.log(err.stack); runPrompt(); }) } runPrompt();
Press tab. After that, no command works without restarting the application.
All commands should appear
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
v10.19.0
Platform
Linux 45-159-188-235 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
https://github.com/sullof/inquirer-command-prompt
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Press tab. After that, no command works without restarting the application.
What is the expected behavior?
All commands should appear
What do you see instead?
Additional information
bandicam.2021-11-02.14-42-25-009.mp4
The text was updated successfully, but these errors were encountered: