#shell #sh #bash

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

#108 in Command-line interface

Download history 17040/week @ 2023-12-18 11701/week @ 2023-12-25 16835/week @ 2024-01-01 17550/week @ 2024-01-08 18441/week @ 2024-01-15 20398/week @ 2024-01-22 20539/week @ 2024-01-29 21619/week @ 2024-02-05 21748/week @ 2024-02-12 21026/week @ 2024-02-19 21321/week @ 2024-02-26 24255/week @ 2024-03-04 21698/week @ 2024-03-11 22657/week @ 2024-03-18 21625/week @ 2024-03-25 20920/week @ 2024-04-01

88,420 downloads per month
Used in 53 crates (35 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.1–3MB
~53K SLoC