wsl_open_browser 2021.823.702

Inside WSL2 opens a html file in the browser that is in Win10. The local file path is transformed between Linux and Win10 notation.
Documentation
1
2
3
4
5
6
7
8
9
10
use std::env;
use wsl_open_browser::*;

fn main() {
    let args: Vec<String> = env::args().collect();
    // only the 1st argument (the 0 argument is the binary path+name)
    // if we omit the argument it will default to "."
    let arg_1 = if args.len() >= 2 { &args[1] } else { "." };
    open_browser(arg_1);
}