9 releases

0.2.1 Jul 25, 2024
0.2.0 Apr 12, 2024
0.1.6 Sep 8, 2023
0.1.5 Sep 28, 2022
0.1.3 Dec 16, 2021

#303 in Command-line interface

Download history 15973/week @ 2024-08-12 17004/week @ 2024-08-19 21927/week @ 2024-08-26 14228/week @ 2024-09-02 17923/week @ 2024-09-09 19711/week @ 2024-09-16 23004/week @ 2024-09-23 31175/week @ 2024-09-30 17120/week @ 2024-10-07 24196/week @ 2024-10-14 20264/week @ 2024-10-21 24376/week @ 2024-10-28 13715/week @ 2024-11-04 39889/week @ 2024-11-11 37051/week @ 2024-11-18 13364/week @ 2024-11-25

104,607 downloads per month
Used in 20 crates (13 directly)

MIT/Apache

16KB
149 lines

argfile

Load additional CLI args from file

Documentation License Crates Status

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

argfile

Load additional CLI args from file

Prior art:

This is meant to work with any CLI parser, like clap, by pre-processing the arguments, like wild.

Examples

argfile::expand_args(
    argfile::parse_fromfile,
    argfile::PREFIX,
).unwrap();

To integrate this with wild and clap

let args = wild::args_os();
let args = argfile::expand_args_from(
    args,
    argfile::parse_fromfile,
    argfile::PREFIX,
).unwrap();
let matches = clap::Command::new("your_app")
    .get_matches_from(args);

Dependencies

~310–460KB