Can the slice pattern in Rust be used to parse command line arguments?
I capture the arguments as: let args: Vec<String> = std::env::args().skip(1).collect();
I'm thinking something like this, which doesn't compile:
// example usage: progname run bash ls -la
match args {
["run", rest_of_commands[..]] => println!("{:?}", rest_of_commands),
_ => println!("usage: run <your-command>"),
}