diff --git a/Cargo.lock b/Cargo.lock index 72754b02..837028b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -794,6 +794,12 @@ dependencies = [ "wasi", ] +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + [[package]] name = "half" version = "2.4.1" @@ -874,7 +880,7 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hl" -version = "0.29.10" +version = "0.29.11" dependencies = [ "bincode", "byte-strings", @@ -930,6 +936,7 @@ dependencies = [ "thiserror", "titlecase", "toml", + "wild", "wildflower", "wildmatch", "winapi-util", @@ -2008,6 +2015,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "wild" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3131afc8c575281e1e80f36ed6a092aa502c08b18ed7524e86fbbb12bb410e1" +dependencies = [ + "glob", +] + [[package]] name = "wildflower" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index 35a600a0..51af8cfc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = [".", "crate/encstr"] [workspace.package] repository = "https://github.com/pamburus/hl" authors = ["Pavel Ivanov "] -version = "0.29.10" +version = "0.29.11" edition = "2021" license = "MIT" @@ -76,6 +76,7 @@ strum = { version = "0", features = ["derive"] } thiserror = "1" titlecase = "3" toml = "0" +wild = "2" wildflower = { git = "https://github.com/cassaundra/wildflower.git" } winapi-util = { version = "0" } wyhash = "0" diff --git a/src/cli.rs b/src/cli.rs index 03452e24..8310dbbd 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -43,7 +43,7 @@ impl BootstrapOpt { } pub fn args() -> Vec { - let mut args = std::env::args(); + let mut args = wild::args(); let Some(first) = args.next() else { return vec![]; }; diff --git a/src/main.rs b/src/main.rs index e5efef64..bfd024ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,7 +34,7 @@ fn run() -> Result<()> { let settings = config::load(cli::BootstrapOpt::parse().args.config.as_deref())?; config::global::initialize(settings.clone()); - let opt = cli::Opt::parse(); + let opt = cli::Opt::parse_from(wild::args()); if opt.help { return cli::Opt::command().print_help().map_err(Error::Io); }