19 lines
480 B
Rust
19 lines
480 B
Rust
use clap::Parser;
|
|
|
|
#[derive(Parser)]
|
|
#[clap(about = "A copy of the wslpath tool from wsl for faster execution", long_about = None)]
|
|
struct CommandLine {
|
|
#[clap(value_parser, help="The input path to convert to WSL")]
|
|
path_string: String
|
|
}
|
|
|
|
fn main() {
|
|
match CommandLine::try_parse() {
|
|
Ok(cmd_line) => {
|
|
print!("{}", wslpath::convert(cmd_line.path_string));
|
|
},
|
|
Err(error) => {
|
|
eprintln!("{}", error);
|
|
}
|
|
}
|
|
} |