diff --git a/shlextest/Cargo.lock b/shlextest/Cargo.lock new file mode 100644 index 0000000..807fe98 --- /dev/null +++ b/shlextest/Cargo.lock @@ -0,0 +1,16 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "shlex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" + +[[package]] +name = "shlextest" +version = "0.1.0" +dependencies = [ + "shlex", +] diff --git a/shlextest/Cargo.toml b/shlextest/Cargo.toml new file mode 100644 index 0000000..40f0981 --- /dev/null +++ b/shlextest/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "shlextest" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +shlex = "1.1.0" diff --git a/shlextest/src/main.rs b/shlextest/src/main.rs new file mode 100644 index 0000000..2d3a77b --- /dev/null +++ b/shlextest/src/main.rs @@ -0,0 +1,4 @@ +fn main() { + let args = std::env::args().collect::>().join(" "); + println!("{:?}", shlex::split(&args)); +}