wsl-dirutils 0.1.0

The cli tool that wraps directory/path-related commands in wslpath.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::{
    pathutil::convert_to_wsl_with_notify,
    usage::{show_usage_and_exit, UsageType},
};
use std::process::exit;

pub fn exec(dir: Option<String>) {
    if let Some(dir) = dir {
        println!("{}", convert_to_wsl_with_notify(dir));
        exit(0);
    } else {
        show_usage_and_exit(UsageType::CmdConvert);
    }
}