Feat: command default value
See original GitHub issueAllow passing default value to a command.
Currently you can only pass opts.default: true
to make the command default to the whole CLI.
Problem comes from the
if (opts.default) this.default = cmd;
Use case:
sade
.command('run [file]', 'Run your file', {
default: 'src/index.js',
// default: true,
alias: ['r'],
})
.example('run')
.example('run file.js')
.action((file, argv) => {
console.log(file); // currently `undefined`
});
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
FEAT/UserGuide - FSL - FslWiki
By default BET brain extraction is applied to create a brain mask from the mean volume in the FMRI data. This is normally...
Read more >Show default values for each command flag #17191 - GitHub
Show default values for each command flag #17191 ... feat(@angular/cli): add default value for options in help #17893.
Read more >FTP Commands: FEAT, OPTS, HELP, STAT, NLST, XCUP ...
The FEAT command eliminates the need for this type of trial-and-error discovery. Common responses: ... FTP Voyager uses a default value of 6....
Read more >FT.CREATE - Redis
is default score for documents in the index. Default score is 1.0. SCORE_FIELD {score_attribute}. is document attribute that you use as the document...
Read more >Configuring a SCCP Test Message
This can be verified by entering the rtrv-feat command. If the gtt value is on , the GTT ... Default value - ANSI...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That, or this is just one of the few times you’ve found found yourself needing slightly more flexibility (even though there’s no lack of functionality) 😉
Sure 😉
Valid point too.
Hm. Just remembered that in the beginning (around 2013) and a few following years I was exactly in that “strict” team. Seems like I loose (pun intended) that through the years and switched teams, haha.