diff -pruN 0.1.1-1/Cargo.toml 1.1.0-1/Cargo.toml
--- 0.1.1-1/Cargo.toml	2015-06-23 01:12:53.000000000 +0000
+++ 1.1.0-1/Cargo.toml	1970-01-01 00:00:01.000000000 +0000
@@ -3,7 +3,7 @@
 # When uploading crates to the registry Cargo will automatically
 # "normalize" Cargo.toml files for maximal compatibility
 # with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
+# to registry (e.g., crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
@@ -12,8 +12,13 @@
 
 [package]
 name = "shlex"
-version = "0.1.1"
-authors = ["comex <comexk@gmail.com>"]
-description = "Split a string into shell words, like Python's shlex.\n"
-license = "MIT/Apache-2.0"
+version = "1.1.0"
+authors = ["comex <comexk@gmail.com>", "Fenhl <fenhl@fenhl.net>"]
+description = "Split a string into shell words, like Python's shlex."
+categories = ["command-line-interface", "parser-implementations"]
+license = "MIT OR Apache-2.0"
 repository = "https://github.com/comex/rust-shlex"
+
+[features]
+default = ["std"]
+std = []
diff -pruN 0.1.1-1/Cargo.toml.orig 1.1.0-1/Cargo.toml.orig
--- 0.1.1-1/Cargo.toml.orig	2015-06-23 01:12:53.000000000 +0000
+++ 1.1.0-1/Cargo.toml.orig	1973-11-29 21:33:09.000000000 +0000
@@ -1,9 +1,18 @@
 [package]
 name = "shlex"
-version = "0.1.1"
-authors = ["comex <comexk@gmail.com>"]
-license = "MIT/Apache-2.0"
+version = "1.1.0"
+authors = [
+    "comex <comexk@gmail.com>",
+    "Fenhl <fenhl@fenhl.net>"
+]
+license = "MIT OR Apache-2.0"
 repository = "https://github.com/comex/rust-shlex"
-description = """
-Split a string into shell words, like Python's shlex.
-"""
+description = "Split a string into shell words, like Python's shlex."
+categories = [
+    "command-line-interface",
+    "parser-implementations"
+]
+
+[features]
+std = []
+default = ["std"]
Binary files 0.1.1-1/.Cargo.toml.swp and 1.1.0-1/.Cargo.toml.swp differ
diff -pruN 0.1.1-1/.cargo_vcs_info.json 1.1.0-1/.cargo_vcs_info.json
--- 0.1.1-1/.cargo_vcs_info.json	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.0-1/.cargo_vcs_info.json	1970-01-01 00:00:01.000000000 +0000
@@ -0,0 +1,5 @@
+{
+  "git": {
+    "sha1": "8638f145d9356eed9c83e7b2f13c5209e72f0e27"
+  }
+}
diff -pruN 0.1.1-1/CHANGELOG.md 1.1.0-1/CHANGELOG.md
--- 0.1.1-1/CHANGELOG.md	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.0-1/CHANGELOG.md	1973-11-29 21:33:09.000000000 +0000
@@ -0,0 +1,17 @@
+# 1.1.0
+
+* Adds the `std` feature (enabled by default)
+* Disabling the `std` feature makes the crate work in `#![no_std]` mode, assuming presence of the `alloc` crate
+
+# 1.0.0
+
+* Adds the `join` convenience function.
+* Fixes parsing of `'\\n'` to match the behavior of bash/Zsh/Python `shlex`. The result was previously `\n`, now it is `\\n`.
+
+# 0.1.1
+
+* Adds handling of `#` comments.
+
+# 0.1.0
+
+This is the initial release.
diff -pruN 0.1.1-1/debian/cargo-checksum.json 1.1.0-1/debian/cargo-checksum.json
--- 0.1.1-1/debian/cargo-checksum.json	2018-07-05 22:19:53.000000000 +0000
+++ 1.1.0-1/debian/cargo-checksum.json	2022-07-31 17:08:52.000000000 +0000
@@ -1 +1 @@
-{"package":"7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2","files":{}}
+{"package":"43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3","files":{}}
diff -pruN 0.1.1-1/debian/changelog 1.1.0-1/debian/changelog
--- 0.1.1-1/debian/changelog	2018-07-05 22:19:53.000000000 +0000
+++ 1.1.0-1/debian/changelog	2022-07-31 17:08:52.000000000 +0000
@@ -1,3 +1,10 @@
+rust-shlex (1.1.0-1) unstable; urgency=medium
+
+  * Team upload.
+  * Package shlex 1.1.0 from crates.io using debcargo 2.5.0
+
+ -- Peter Michael Green <plugwash@debian.org>  Sun, 31 Jul 2022 17:08:52 +0000
+
 rust-shlex (0.1.1-1) unstable; urgency=medium
 
   * Package shlex 0.1.1 from crates.io using debcargo 2.1.2
diff -pruN 0.1.1-1/debian/compat 1.1.0-1/debian/compat
--- 0.1.1-1/debian/compat	2018-07-05 22:19:53.000000000 +0000
+++ 1.1.0-1/debian/compat	2022-07-31 17:08:52.000000000 +0000
@@ -1 +1 @@
-11
+12
diff -pruN 0.1.1-1/debian/control 1.1.0-1/debian/control
--- 0.1.1-1/debian/control	2018-07-05 22:19:53.000000000 +0000
+++ 1.1.0-1/debian/control	2022-07-31 17:08:52.000000000 +0000
@@ -1,16 +1,18 @@
 Source: rust-shlex
 Section: rust
 Priority: optional
-Build-Depends: debhelper (>= 11),
- dh-cargo (>= 6),
+Build-Depends: debhelper (>= 12),
+ dh-cargo (>= 25),
  cargo:native <!nocheck>,
  rustc:native <!nocheck>,
  libstd-rust-dev <!nocheck>
 Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
-Uploaders: Sylvestre Ledru <sylvestre@debian.org>
-Standards-Version: 4.1.4
-Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git
-Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf
+Uploaders:
+ Sylvestre Ledru <sylvestre@debian.org>
+Standards-Version: 4.5.1
+Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/shlex]
+Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/shlex
+Rules-Requires-Root: no
 
 Package: librust-shlex-dev
 Architecture: any
@@ -19,12 +21,16 @@ Depends:
  ${misc:Depends}
 Provides:
  librust-shlex+default-dev (= ${binary:Version}),
- librust-shlex-0-dev (= ${binary:Version}),
- librust-shlex-0+default-dev (= ${binary:Version}),
- librust-shlex-0.1-dev (= ${binary:Version}),
- librust-shlex-0.1+default-dev (= ${binary:Version}),
- librust-shlex-0.1.1-dev (= ${binary:Version}),
- librust-shlex-0.1.1+default-dev (= ${binary:Version})
+ librust-shlex+std-dev (= ${binary:Version}),
+ librust-shlex-1-dev (= ${binary:Version}),
+ librust-shlex-1+default-dev (= ${binary:Version}),
+ librust-shlex-1+std-dev (= ${binary:Version}),
+ librust-shlex-1.1-dev (= ${binary:Version}),
+ librust-shlex-1.1+default-dev (= ${binary:Version}),
+ librust-shlex-1.1+std-dev (= ${binary:Version}),
+ librust-shlex-1.1.0-dev (= ${binary:Version}),
+ librust-shlex-1.1.0+default-dev (= ${binary:Version}),
+ librust-shlex-1.1.0+std-dev (= ${binary:Version})
 Description: Split a string into shell words, like Python's shlex - Rust source code
  This package contains the source for the Rust shlex crate, packaged by debcargo
  for use with cargo and dh-cargo.
diff -pruN 0.1.1-1/debian/copyright 1.1.0-1/debian/copyright
--- 0.1.1-1/debian/copyright	2018-07-05 22:19:53.000000000 +0000
+++ 1.1.0-1/debian/copyright	2022-07-31 17:08:52.000000000 +0000
@@ -4,12 +4,15 @@ Upstream-Contact: comex <comexk@gmail.co
 Source: https://github.com/comex/rust-shlex
 
 Files: *
-Copyright: Nicholas Allegra (comex) <comexk@gmail.com>
+Copyright: 
+ 2015 Nicholas Allegra (comex) <comexk@gmail.com>
+ 2018-2022 Fenhl <fenhl@fenhl.net>
 License: MIT or Apache-2.0
 
 Files: debian/*
-Copyright: 2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
-           2018 Sylvestre Ledru <sylvestre@debian.org>
+Copyright: 
+ 2018-2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+ 2018 Sylvestre Ledru <sylvestre@debian.org>
 License: MIT or Apache-2.0
 
 License: Apache-2.0
diff -pruN 0.1.1-1/debian/copyright.debcargo.hint 1.1.0-1/debian/copyright.debcargo.hint
--- 0.1.1-1/debian/copyright.debcargo.hint	2018-07-05 22:19:53.000000000 +0000
+++ 1.1.0-1/debian/copyright.debcargo.hint	2022-07-31 17:08:52.000000000 +0000
@@ -1,10 +1,14 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: shlex
-Upstream-Contact: comex <comexk@gmail.com>
+Upstream-Contact:
+ comex <comexk@gmail.com>
+ Fenhl <fenhl@fenhl.net>
 Source: https://github.com/comex/rust-shlex
 
 Files: *
-Copyright: FIXME (overlay) UNKNOWN comex <comexk@gmail.com>
+Copyright:
+ FIXME (overlay) UNKNOWN-YEARS comex <comexk@gmail.com>
+ FIXME (overlay) UNKNOWN-YEARS Fenhl <fenhl@fenhl.net>
 License: MIT or Apache-2.0
 Comment:
  FIXME (overlay): Since upstream copyright years are not available in
@@ -12,16 +16,31 @@ Comment:
  be correct information so you should review and fix this before uploading to
  the archive.
 
+Files: ./LICENSE-APACHE
+Copyright: 2015 Nicholas Allegra (comex).
+License: UNKNOWN-LICENSE; FIXME (overlay)
+Comment:
+ FIXME (overlay): These notices are extracted from files. Please review them
+ before uploading to the archive.
+
+Files: ./LICENSE-MIT
+Copyright: 2015 Nicholas Allegra (comex).
+License: UNKNOWN-LICENSE; FIXME (overlay)
+Comment:
+ FIXME (overlay): These notices are extracted from files. Please review them
+ before uploading to the archive.
+
 Files: ./src/lib.rs
 Copyright: 2015 Nicholas Allegra (comex).
-License: UNKNOWN; FIXME (overlay)
+License: UNKNOWN-LICENSE; FIXME (overlay)
 Comment:
  FIXME (overlay): These notices are extracted from files. Please review them
  before uploading to the archive.
 
 Files: debian/*
-Copyright: 2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
-           2018 FIXME (overlay) Your Name <Your Email>
+Copyright:
+ 2018-2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+ 2018-2022 Sylvestre Ledru <sylvestre@debian.org>
 License: MIT or Apache-2.0
 
 License: Apache-2.0
@@ -46,6 +65,3 @@ License: MIT
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
-
-
-
diff -pruN 0.1.1-1/debian/debcargo.toml 1.1.0-1/debian/debcargo.toml
--- 0.1.1-1/debian/debcargo.toml	2018-07-05 22:19:53.000000000 +0000
+++ 1.1.0-1/debian/debcargo.toml	2022-07-31 17:08:52.000000000 +0000
@@ -1 +1,2 @@
 overlay = "."
+uploaders = ["Sylvestre Ledru <sylvestre@debian.org>"]
diff -pruN 0.1.1-1/debian/rules 1.1.0-1/debian/rules
--- 0.1.1-1/debian/rules	2018-07-05 22:19:53.000000000 +0000
+++ 1.1.0-1/debian/rules	2022-07-31 17:08:52.000000000 +0000
@@ -1,3 +1,6 @@
 #!/usr/bin/make -f
 %:
 	dh $@ --buildsystem cargo
+
+override_dh_auto_test:
+	dh_auto_test -- test --all
diff -pruN 0.1.1-1/debian/tests/control 1.1.0-1/debian/tests/control
--- 0.1.1-1/debian/tests/control	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.0-1/debian/tests/control	2022-07-31 17:08:52.000000000 +0000
@@ -0,0 +1,19 @@
+Test-Command: /usr/share/cargo/bin/cargo-auto-test shlex 1.1.0 --all-targets --all-features
+Features: test-name=rust-shlex:@
+Depends: dh-cargo (>= 18), @
+Restrictions: allow-stderr, skip-not-installable
+
+Test-Command: /usr/share/cargo/bin/cargo-auto-test shlex 1.1.0 --all-targets 
+Features: test-name=librust-shlex-dev:default
+Depends: dh-cargo (>= 18), @
+Restrictions: allow-stderr, skip-not-installable
+
+Test-Command: /usr/share/cargo/bin/cargo-auto-test shlex 1.1.0 --all-targets --no-default-features --features std
+Features: test-name=librust-shlex-dev:std
+Depends: dh-cargo (>= 18), @
+Restrictions: allow-stderr, skip-not-installable
+
+Test-Command: /usr/share/cargo/bin/cargo-auto-test shlex 1.1.0 --all-targets --no-default-features
+Features: test-name=librust-shlex-dev:
+Depends: dh-cargo (>= 18), @
+Restrictions: allow-stderr, skip-not-installable
diff -pruN 0.1.1-1/debian/watch 1.1.0-1/debian/watch
--- 0.1.1-1/debian/watch	2018-07-05 22:19:53.000000000 +0000
+++ 1.1.0-1/debian/watch	2022-07-31 17:08:52.000000000 +0000
@@ -1,4 +1,4 @@
 version=4
-opts=filenamemangle=s/.*\/(.*)\/download/shlex-$1\.tar\.gz/g\ 
- https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/shlex .*/crates/shlex/@ANY_VERSION@/download
-
+opts=filenamemangle=s/.*\/(.*)\/download/shlex-$1\.tar\.gz/g,\
+uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \
+https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/shlex .*/crates/shlex/@ANY_VERSION@/download
diff -pruN 0.1.1-1/.github/workflows/test.yml 1.1.0-1/.github/workflows/test.yml
--- 0.1.1-1/.github/workflows/test.yml	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.0-1/.github/workflows/test.yml	1973-11-29 21:33:09.000000000 +0000
@@ -0,0 +1,36 @@
+name: Rust
+
+on:
+  pull_request:
+  push:
+
+jobs:
+  check:
+    name: Check
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - uses: ATiltedTree/setup-rust@v1
+        with:
+          rust-version: stable
+      - run: cargo check
+
+  test:
+    name: Test
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - uses: ATiltedTree/setup-rust@v1
+        with:
+          rust-version: stable
+      - run: cargo test
+  
+  test_no_default_features:
+    name: Test (no default features)
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - uses: ATiltedTree/setup-rust@v1
+        with:
+          rust-version: stable
+      - run: cargo test --no-default-features
diff -pruN 0.1.1-1/.gitignore 1.1.0-1/.gitignore
--- 0.1.1-1/.gitignore	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.0-1/.gitignore	1973-11-29 21:33:09.000000000 +0000
@@ -0,0 +1,3 @@
+/target/
+Cargo.lock
+**/*.rs.bk
diff -pruN 0.1.1-1/LICENSE-APACHE 1.1.0-1/LICENSE-APACHE
--- 0.1.1-1/LICENSE-APACHE	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.0-1/LICENSE-APACHE	1973-11-29 21:33:09.000000000 +0000
@@ -0,0 +1,13 @@
+Copyright 2015 Nicholas Allegra (comex).
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff -pruN 0.1.1-1/LICENSE-MIT 1.1.0-1/LICENSE-MIT
--- 0.1.1-1/LICENSE-MIT	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.0-1/LICENSE-MIT	1973-11-29 21:33:09.000000000 +0000
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Nicholas Allegra (comex).
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff -pruN 0.1.1-1/README.md 1.1.0-1/README.md
--- 0.1.1-1/README.md	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.0-1/README.md	1973-11-29 21:33:09.000000000 +0000
@@ -0,0 +1,30 @@
+
+Same idea as (but implementation not directly based on) the Python shlex
+module. However, this implementation does not support any of the Python
+module's customization because it makes parsing slower and is fairly useless.
+You only get the default settings of shlex.split, which mimic the POSIX shell:
+<https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html>
+
+This implementation also deviates from the Python version in not treating \r
+specially, which I believe is more compliant.
+
+The algorithms in this crate are oblivious to UTF-8 high bytes, so they iterate
+over the bytes directly as a micro-optimization.
+
+Disabling the `std` feature (which is enabled by default) will allow the crate
+to work in `no_std` environments, where the `alloc` crate, and a global
+allocator, are available.
+
+# LICENSE
+
+The source code in this repository is Licensed under either of
+- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
+  https://www.apache.org/licenses/LICENSE-2.0)
+- MIT license ([LICENSE-MIT](LICENSE-MIT) or
+  https://opensource.org/licenses/MIT)
+
+at your option.
+
+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.
diff -pruN 0.1.1-1/src/lib.rs 1.1.0-1/src/lib.rs
--- 0.1.1-1/src/lib.rs	2015-06-23 01:20:27.000000000 +0000
+++ 1.1.0-1/src/lib.rs	1973-11-29 21:33:09.000000000 +0000
@@ -1,26 +1,38 @@
 // Copyright 2015 Nicholas Allegra (comex).
-// Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> or
-// the MIT license <http://opensource.org/licenses/MIT>, at your option. This file may not be
+// Licensed under the Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> or
+// the MIT license <https://opensource.org/licenses/MIT>, at your option. This file may not be
 // copied, modified, or distributed except according to those terms.
 
 //! Same idea as (but implementation not directly based on) the Python shlex module.  However, this
 //! implementation does not support any of the Python module's customization because it makes
 //! parsing slower and is fairly useless.  You only get the default settings of shlex.split, which
 //! mimic the POSIX shell:
-//! http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
+//! <https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html>
 //!
-//! This implementation also deviates from the Python version in not treating \r specially, which I
-//! believe is more compliant.
+//! This implementation also deviates from the Python version in not treating `\r` specially, which
+//! I believe is more compliant.
 //!
 //! The algorithms in this crate are oblivious to UTF-8 high bytes, so they iterate over the bytes
 //! directly as a micro-optimization.
+//!
+//! Disabling the `std` feature (which is enabled by default) will allow the crate to work in
+//! `no_std` environments, where the `alloc` crate, and a global allocator, are available.
 
-use std::borrow::Cow;
+#![cfg_attr(not(feature = "std"), no_std)]
+
+extern crate alloc;
+use alloc::vec::Vec;
+use alloc::borrow::Cow;
+use alloc::string::String;
+#[cfg(test)]
+use alloc::vec;
+#[cfg(test)]
+use alloc::borrow::ToOwned;
 
 /// An iterator that takes an input string and splits it into the words using the same syntax as
 /// the POSIX shell.
 pub struct Shlex<'a> {
-    in_iter: std::str::Bytes<'a>,
+    in_iter: core::str::Bytes<'a>,
     /// The number of newlines read so far, plus one.
     pub line_no: usize,
     /// An input string is erroneous if it ends while inside a quotation or right after an
@@ -96,17 +108,6 @@ impl<'a> Shlex<'a> {
         loop {
             if let Some(ch2) = self.next_char() {
                 match ch2 as char {
-                    '\\' => {
-                        if let Some(ch3) = self.next_char() {
-                            match ch3 as char {
-                                // for single quotes, only these can be escaped
-                                '\'' | '\\' => { result.push(ch3); },
-                                _ => { result.push('\\' as u8); result.push(ch3); }
-                            }
-                        } else {
-                            return Err(());
-                        }
-                    },
                     '\'' => { return Ok(()); },
                     _ => { result.push(ch2); },
                 }
@@ -181,6 +182,15 @@ pub fn quote(in_str: &str) -> Cow<str> {
     }
 }
 
+/// Convenience function that consumes an iterable of words and turns it into a single string,
+/// quoting words when necessary. Consecutive words will be separated by a single space.
+pub fn join<'a, I: IntoIterator<Item = &'a str>>(words: I) -> String {
+    words.into_iter()
+        .map(quote)
+        .collect::<Vec<_>>()
+        .join(" ")
+}
+
 #[cfg(test)]
 static SPLIT_TEST_ITEMS: &'static [(&'static str, Option<&'static [&'static str]>)] = &[
     ("foo$baz", Some(&["foo$baz"])),
@@ -191,7 +201,7 @@ static SPLIT_TEST_ITEMS: &'static [(&'st
     ("foo\\\nbar", Some(&["foobar"])),
     ("\"foo\\\nbar\"", Some(&["foobar"])),
     ("'baz\\$b'", Some(&["baz\\$b"])),
-    ("'baz\\\''", Some(&["baz\'"])),
+    ("'baz\\\''", None),
     ("\\", None),
     ("\"\\", None),
     ("'\\", None),
@@ -201,6 +211,8 @@ static SPLIT_TEST_ITEMS: &'static [(&'st
     ("foo #bar", Some(&["foo"])),
     ("foo#bar", Some(&["foo#bar"])),
     ("foo\"#bar", None),
+    ("'\\n'", Some(&["\\n"])),
+    ("'\\\\n'", Some(&["\\\\n"])),
 ];
 
 #[test]
@@ -227,3 +239,11 @@ fn test_quote() {
     assert_eq!(quote("\""), "\"\\\"\"");
     assert_eq!(quote(""), "\"\"");
 }
+
+#[test]
+fn test_join() {
+    assert_eq!(join(vec![]), "");
+    assert_eq!(join(vec![""]), "\"\"");
+    assert_eq!(join(vec!["a", "b"]), "a b");
+    assert_eq!(join(vec!["foo bar", "baz"]), "\"foo bar\" baz");
+}
Binary files 0.1.1-1/src/.lib.rs.swp and 1.1.0-1/src/.lib.rs.swp differ
