Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed.
Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively.
so the @my-args.txt argument is expanded / replaced with the contents of the my-args.txt file
my use case: i made my own parser generator, generated from gcc's opt files, to parse a subset of gcc options in gcc-options-parser ... now im looking for a cheap way to implement the "parse arguments from file" feature
This is slightly beyond the scope of Argbash, although if the feature was cheap, it would make sense. Having an eval that executes contents of a runtime-supplied file is too much.
gcc has this option:
so the
@my-args.txt
argument is expanded / replaced with the contents of themy-args.txt
filemy use case: i made my own parser generator, generated from gcc's opt files, to parse a subset of gcc options in gcc-options-parser ... now im looking for a cheap way to implement the "parse arguments from file" feature
challenge: string parsing → shlex in python
cheap solution: eval