Argu
Argu copied to clipboard
feat: Support response files
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 froma.rsp
and after these fromb.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...
Can a response file can do anything significant that an AppSettings file can't?
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.