Open
Description
Some tools/situations end up needing so many arguments that they can run in to the max command line length. This is usually handled via argument files or parameter files -- if an argument is prefixed with a marker (usually @
), then the contents of the referenced file are read at that location in the command line as if the content were on the command line. This also usually works recursively in that the read file could include another one of these directives to read yet another file.
There can be two types of "modes" that are supported for reading these files:
- multiline : Every line of the files is a single argument. This is the easy one, as it means spaces, etc. are part of the arg, there is no need to understand escaping, just split on newlines and handle things.
- shell quoted : The files are parse like a Bourne shell would, this requires handing quotes and escapes.
swift
andclang
support files in this form.
Reference:
- Python ArgParse support: https://docs.python.org/3/library/argparse.html#fromfile-prefix-chars
- Bazel docs with notes about generating files for these two modes: https://docs.bazel.build/versions/2.0.0/skylark/lib/Args.html#set_param_file_format