Allow short argument names when using double dashed args
See original GitHub issueBackground
Currently one-letter arguments are only supported with single-dashed arguments. e.g.
This works:
dotnet cake -a=5
Whereas this does not work (error: Invalid long option name
)
dotnet cake --a=5
Proposal
This issue intends to make the necessary updates to allow short argument names when using double-dashed arguments.
Important
Cake uses Spectre.Console for parsing arguments, so there’s a little bit of investigation needed to see if the fix can (and should) be done directly in Cake, of if it should be fixed upstream. If you discover that the fix doesn’t belong in Cake, you’d need to send a PR to Spectre.Console and the fix in Cake would be just upgrading to a newer version of Spectre.Console.
Related:
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Allow empty arguments when using double dashed args
This issue intends to make the necessary updates to allow empty arguments when using the --argName= syntax, which translates to the argument value...
Read more >How to pass double dash as part of argument to a program ...
One of the argument -a is string type and I would like to pass an argument with double dash "--" to it. import...
Read more >Double Dash (--) parameters in Bash Script
I have a project I am working on that requires a parameter with a double dash. For example, running the command should look...
Read more >Why do options with long strings have a double dash?
The issue is that you can say things like ls -laR ; it's equivalent to ls -l -a -R . So -recursive would...
Read more >What's the difference betwen the single dash and double ...
The double hyphen disambiguates the command-line argument, ensuring that ... short options with single dash vs long options with double dash.
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
@MariaSolOs https://github.com/cake-build/cake/pull/3456 sorts the issue you’re seeing
@augustoproiete no problem at all! In fact I think this is great since I want to get a better grasp of the codebase before working on my contribution. 😃