3 releases
0.1.3 | Dec 9, 2021 |
---|---|
0.1.2 |
|
0.1.1 | Dec 8, 2021 |
0.1.0 | Dec 8, 2021 |
#48 in #command-arguments
69 downloads per month
Used in 2 crates
(via blades)
10KB
221 lines
A simple library to parse a command with arguments.
On a string that represents a command, such as one that is supposed to be passed
to a shell, one can't simply use split_whitespace
, since some argumenst may be
quoted and contain multiple words.
This crate provides an analogous parser, which keeps quoted items together.
Serde
Additionlay, when the serde
feature is enabled (which is the case by default),
this crate provides a type Cmd
which implements Deserialize
.
There is also a type CmdBorrow
, which doesn't do any copying unless necessary.
Note that to use it when automatically deriving Deserialize
, the field of this
type needs to be marked with #[serde(borrow)]
attribute.
Dependencies
~105–335KB