question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow short argument names when using double dashed args

See original GitHub issue

Background

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:open
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
devleadcommented, Sep 2, 2021
1reaction
MariaSolOscommented, Aug 31, 2021

@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. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found