Open vadimkantorov opened 1 year ago
Agree that it would be nice to have these as built-ins, similar to wslpath
.
To be honest, it hasn't been all that important until recently. This functionality is provided out-of-the-box in Ubuntu 20.04 on WSL using the preinstalled wslu
package, so most users never noticed it was missing.
However, Ubuntu 22.04, for some reason, has decided not to include the package, even in the repo. And, of course, other distributions could benefit from it as well.
With folks beginning to move to 22.04, though, it's functionality that's going to be "missed" for a majority of users.
It's still possible, of course, to install wslu under most distributions.
At least under Ubuntu (and likely others), it nicely integrates by registering wslview
in the Alternatives system for things like www-browser
(and others). That means that xdg-open
and any Linux app that utilizes it (e.g. Python, Node) will automatically work as well.
And just for reference, most are handled with explorer.exe <file_to_open>
rather than cmd.exe
.
This will help to open files in default Windows apps for that file extension. Similar commands exist in Mac (open.exe) and in Ubuntu (xdg-open.exe) and are useful to open files in OS's default image viewers or pdf viewers
It can probably be achieved by
alias open="cmd.exe /c"
, but it would be nice if a recommended/tested way existed