Crate cmdline_parser [] [src]

Parse cmdlines in a way that resembles the platform default.

Example

use cmdline_parser::Parser;

let mut parser = Parser::new(r#"mv "my file" project/"#);

assert_eq!(parser.next(), Some((0..2, "mv".into())));
assert_eq!(parser.next(), Some((3..12, "my file".into())));
assert_eq!(parser.next(), Some((13..21, "project/".into())));
assert_eq!(parser.next(), None);

Reexports

pub use unix::Parser;

Modules

unix

bash-like cmdline parser

windows

cmd-like cmdline parser

Functions

parse_single

Parse the given string as a single argument.