#bash #shell #sh

shellwords

Manipulate strings according to the word parsing rules of the UNIX Bourne shell

3 releases (stable)

1.1.0 Jun 27, 2020
1.0.0 Sep 27, 2018
0.1.0 Sep 3, 2017

#80 in Command-line interface

Download history 1408/week @ 2021-02-24 1160/week @ 2021-03-03 1822/week @ 2021-03-10 1047/week @ 2021-03-17 1380/week @ 2021-03-24 1233/week @ 2021-03-31 1618/week @ 2021-04-07 1362/week @ 2021-04-14 957/week @ 2021-04-21 984/week @ 2021-04-28 832/week @ 2021-05-05 860/week @ 2021-05-12 1107/week @ 2021-05-19 1153/week @ 2021-05-26 1105/week @ 2021-06-02 820/week @ 2021-06-09

5,173 downloads per month
Used in 22 crates (15 directly)

MIT license

9KB
142 lines

shellwords

Crate shellwords provides utilities for parsing strings as they would be interpreted by the UNIX Bourne shell.

Examples

Split a string into a vector of words in the same way the UNIX Bourne shell does:

assert_eq!(split("here are \"two words\"").unwrap(), ["here", "are", "two words"]);

Legal

shellwords is released under the MIT license. See LICENSE for details.


lib.rs:

Crate shellwords provides utilities for parsing strings as they would be interpreted by the UNIX Bourne shell.

Dependencies

~1–1.4MB
~39K SLoC