#shell #string-parser #bash #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

#212 in Command-line interface

Download history 32156/week @ 2024-07-22 31467/week @ 2024-07-29 29871/week @ 2024-08-05 26378/week @ 2024-08-12 20017/week @ 2024-08-19 22457/week @ 2024-08-26 28650/week @ 2024-09-02 29212/week @ 2024-09-09 28508/week @ 2024-09-16 28992/week @ 2024-09-23 21346/week @ 2024-09-30 24850/week @ 2024-10-07 34618/week @ 2024-10-14 23712/week @ 2024-10-21 48306/week @ 2024-10-28 19891/week @ 2024-11-04

129,673 downloads per month
Used in 54 crates (36 directly)

MIT license

10KB
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"]);

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

~2.2–3MB
~54K SLoC