Argu icon indicating copy to clipboard operation
Argu copied to clipboard

feat: Support response files

Open enricosada opened this issue 6 years ago • 2 comments

Add builtin support for response files, enabled by a simple configuration.

Response files is a way to write arguments to a file, instead of pass as command line args.

Like https://docs.microsoft.com/en-us/windows/desktop/midl/response-files

Pratically:

  • simple rsp program @path/to/responsefile.rsp will load args from {workDir}/path/to/responsefile.rsp.
  • one argument per line
  • lines who starts with # are comments
  • multiple rsp program @a.rsp @b.rsp will load args first from a.rsp and after these from b.rsp
  • rsp can be mixed with normal args like program @a.rsp --verbosity low @b.rsp --trace
  • rsp can be quoted with double quotes for path with spaces, like program "@path/to/the file.rsp" (or should be @"path/to/the file.rsp" ? )
  • how to escape? program @@a.rsp??

I am missing something? escape ok, quoting ok...

enricosada avatar Sep 12 '18 14:09 enricosada

Can a response file can do anything significant that an AppSettings file can't?

jcmrva avatar Mar 06 '19 21:03 jcmrva

It's different, response files are useful mostly for tooling.

as a note, windows has a max length for command line arguments.

Tooling write args to a file, and invoke the exe with @path/to.rsp. That's useful because sometimes arguments can be really long (for example a list of files with full path)

Are nice for users too, to refactor common arguments (like @debug.rsp) to enable a list of args for a configuration.

enricosada avatar Mar 06 '19 21:03 enricosada