25 lines
359 B
Rust
25 lines
359 B
Rust
|
|
||
|
use pico_args::Arguments;
|
||
|
|
||
|
const DRIVE: &str = "/mnt/c/";
|
||
|
|
||
|
pub fn main() {
|
||
|
let mut args = Arguments::from_env();
|
||
|
|
||
|
loop {
|
||
|
let next = args.subcommand().unwrap();
|
||
|
if let Some(mut arg) = next {
|
||
|
if arg.starts_with(DRIVE) {
|
||
|
arg = arg.replace(DRIVE, "C:\\");
|
||
|
}
|
||
|
arg = arg.replace("/", "\\");
|
||
|
println!("{arg}");
|
||
|
} else {
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|