9 releases

new 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

#129 in Command-line interface

Download history 8845/week @ 2024-04-04 9200/week @ 2024-04-11 9632/week @ 2024-04-18 8990/week @ 2024-04-25 7768/week @ 2024-05-02 8209/week @ 2024-05-09 7435/week @ 2024-05-16 7528/week @ 2024-05-23 10235/week @ 2024-05-30 14989/week @ 2024-06-06 13759/week @ 2024-06-13 15767/week @ 2024-06-20 16817/week @ 2024-06-27 14012/week @ 2024-07-04 11737/week @ 2024-07-11 10964/week @ 2024-07-18

56,530 downloads per month
Used in 15 crates (12 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

~370–520KB