From 1d699276ffcae30d3ecb36a523b790de54e6ba58 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Tue, 24 Jan 2023 10:09:34 -0300 Subject: [PATCH] Testing shlex --- shlextest/Cargo.lock | 16 ++++++++++++++++ shlextest/Cargo.toml | 9 +++++++++ shlextest/src/main.rs | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 shlextest/Cargo.lock create mode 100644 shlextest/Cargo.toml create mode 100644 shlextest/src/main.rs 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)); +}