-
-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
Issue Type
- Bug Report
- Feature Request
- Other
Expected
cli
.command("something", "Do something")
.alias("!")
.action(async () => {
console.log("Did something!");
});
Should log 'Did something!' if you run cli something or cli
Actual
Only logs when running cli something
Possible Solutions
Lines 200 to 210 in abe662b
| if (shouldParse) { | |
| // Search the default command | |
| for (const command of this.commands) { | |
| if (command.name === '') { | |
| shouldParse = false | |
| const parsed = this.mri(argv.slice(2), command) | |
| this.setParsedInfo(parsed, command) | |
| this.emit(`command:!`, command) | |
| } | |
| } | |
| } |
command.isDefaultCommand rather than the name.
We should also add documentation explaining the ! alias.
Info
- CAC version: 6.7.14
- Reproduction link: https://replit.com/@domdomegg/cac-151#index.js
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels