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

#336 in Command-line interface

Download history 14913/week @ 2024-07-31 15362/week @ 2024-08-07 12688/week @ 2024-08-14 21841/week @ 2024-08-21 16335/week @ 2024-08-28 17902/week @ 2024-09-04 17268/week @ 2024-09-11 22135/week @ 2024-09-18 24881/week @ 2024-09-25 26623/week @ 2024-10-02 19811/week @ 2024-10-09 22156/week @ 2024-10-16 21179/week @ 2024-10-23 21633/week @ 2024-10-30 15804/week @ 2024-11-06 41190/week @ 2024-11-13

103,902 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

~305–455KB