on master help sign in
Add support for wildcards in Windows CMD (#329)

Windows does not support wildcard expansion in cmd, this adds 'wild' crate (as discussed in #309) that handles everything transparently, so wildcards work everywhere. Fixes #309

commitb39e28d2c855be1cbb560dd2c6dd65e337b4e218 authorRichard Hozák <r.hozak@seznam.cz> dateWed 3 Oct 2018, 22:59 (8 years ago) parent0d71968
4 files changed+20−1
Cargo.lock+16 Cargo.toml+1 src/app.rs+2−1 src/main.rs+1
Cargo.lock+16
@@ -56,6 +56,7 @@ dependencies = [
5656 "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
5757 "syntect 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
5858 "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
59+ "wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
5960]
6061
6162[[package]]
@@ -201,6 +202,11 @@ dependencies = [
201202 "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
202203]
203204
205+[[package]]
206+name = "glob"
207+version = "0.2.11"
208+source = "registry+https://github.com/rust-lang/crates.io-index"
209+
204210[[package]]
205211name = "idna"
206212version = "0.1.5"
@@ -747,6 +753,14 @@ dependencies = [
747753 "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
748754]
749755
756+[[package]]
757+name = "wild"
758+version = "2.0.1"
759+source = "registry+https://github.com/rust-lang/crates.io-index"
760+dependencies = [
761+ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
762+]
763+
750764[[package]]
751765name = "winapi"
752766version = "0.2.8"
@@ -823,6 +837,7 @@ dependencies = [
823837"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
824838"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
825839"checksum git2 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "591f8be1674b421644b6c030969520bc3fa12114d2eb467471982ed3e9584e71"
840+"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
826841"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
827842"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
828843"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
@@ -893,6 +908,7 @@ dependencies = [
893908"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051"
894909"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
895910"checksum walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "af464bc7be7b785c7ac72e266a6b67c4c9070155606f51655a650a6686204e35"
911+"checksum wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "690e5dbd46cfaf2f3bd09875ad94e92cc56459fce505807d6ce5332671aa93ae"
896912"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
897913"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
898914"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
Cargo.toml+1
@@ -21,6 +21,7 @@ ansi_colours = "^1.0"
2121console = "0.6"
2222directories = "1.0"
2323lazy_static = "1.0"
24+wild = "2.0"
2425
2526[dependencies.git2]
2627version = "0.7"
src/app.rs+2−1
@@ -6,6 +6,7 @@ use atty::{self, Stream};
66
77use clap::ArgMatches;
88use clap_app;
9+use wild;
910
1011use console::Term;
1112
@@ -102,7 +103,7 @@ impl App {
102103 }
103104
104105 fn matches(interactive_output: bool) -> ArgMatches<'static> {
105− clap_app::build_app(interactive_output).get_matches()
106+ clap_app::build_app(interactive_output).get_matches_from(wild::args())
106107 }
107108
108109 pub fn config(&self) -> Result<Config> {
src/main.rs+1
@@ -16,6 +16,7 @@ extern crate console;
1616extern crate directories;
1717extern crate git2;
1818extern crate syntect;
19+extern crate wild;
1920
2021mod app;
2122mod assets;