spectre.console icon indicating copy to clipboard operation
spectre.console copied to clipboard

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

Open rajasekarshanmugam opened this issue 2 years ago • 1 comments

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

rajasekarshanmugam avatar Oct 05 '21 03:10 rajasekarshanmugam

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

Simonl9l avatar Mar 05 '22 19:03 Simonl9l

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?

oconnor0 avatar Sep 22 '22 23:09 oconnor0

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

phil-scott-78 avatar Sep 23 '22 00:09 phil-scott-78