8 releases

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

#161 in Command-line interface

Download history 5669/week @ 2024-01-05 10933/week @ 2024-01-12 8637/week @ 2024-01-19 8026/week @ 2024-01-26 8087/week @ 2024-02-02 8924/week @ 2024-02-09 8121/week @ 2024-02-16 8326/week @ 2024-02-23 9398/week @ 2024-03-01 9612/week @ 2024-03-08 10712/week @ 2024-03-15 10023/week @ 2024-03-22 8320/week @ 2024-03-29 8929/week @ 2024-04-05 9799/week @ 2024-04-12 7524/week @ 2024-04-19

36,200 downloads per month
Used in 15 crates (12 directly)

MIT/Apache

16KB
150 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

~360–520KB