#shell #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

#238 in Command-line interface

Download history 98946/week @ 2026-01-22 90849/week @ 2026-01-29 78825/week @ 2026-02-05 52092/week @ 2026-02-12 52056/week @ 2026-02-19 60327/week @ 2026-02-26 46545/week @ 2026-03-05 60050/week @ 2026-03-12 65748/week @ 2026-03-19 63601/week @ 2026-03-26 56994/week @ 2026-04-02 68509/week @ 2026-04-09 53659/week @ 2026-04-16 50844/week @ 2026-04-23 81337/week @ 2026-04-30 61263/week @ 2026-05-07

259,907 downloads per month
Used in 76 crates (49 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.

Dependencies

~1.8–3MB
~50K SLoC