spectreconsole / spectre.console

A .NET library that makes it easier to create beautiful console applications.
https://spectreconsole.net
MIT License
9.43k stars 498 forks source link

Ability to use response files and in-built parser (text => args) from spectre.console to provide consistent behavior #580

Open rajasekarshanmugam opened 3 years ago

rajasekarshanmugam commented 3 years ago

Is your feature request related to a problem? Please describe. For some CLI, no of commands and the commands supported will be many. Using a typical command line is harder and has to be backed by other shell mechanisms. Would be good if a standard response file is supported. Response files typically are simple text files containing the commands, options/arguments. Response files come in different flavors too, single command/option per line or as a single line etc.

Describe the solution you'd like Response files are typically passed via command-line argument @responsefile and this could be the only argument when passed. Console programs tend to read the response file instead of the command line arguments and would parse/split as per needs instead of the default command line arguments (args[] via Main, or Environment.GetCommandLineArgs()).

Describe alternatives you've considered Currently no alternative solution. While it's easy to detect the presence of a response file argument parsing the text file into arguments is needed.

Additional context


Please upvote :+1: this issue if you are interested in it.

Simonl9l commented 2 years ago

I'd Thumbs up this request, Nate McMasters has this in his CLI, but we have other reasons with continue with this one.

oconnor0 commented 2 years ago

I thought I had read somewhere that Spectre.Console supported response files (to pass/intersperse command line arguments), but it looks from this that I must have misread?

phil-scott-78 commented 2 years ago

Yeah, this feature request is still open. Happy to take a look at a pull request if someone wants to give it a go.