You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of thanks for sharing your dotfiles, it's been a major source of inspiration to setup my WSL2 machine lately.
So, I tried using the normalised open(line #144 of the .functions file) code snippet on a WSL2 Ubuntu distro & it won't work as expected. I suspect grep can't read the /proc/version file due to missing sudo privileges(?). I bet a better solution would be to grep the output of uname -r which doesn't require sudo privileges.
A possible "better" solution could be:
if [ !$(uname -s)='Darwin' ];thenif [ $(uname -r | grep -i 'microsoft') ];then# Ubuntu on Windows using the Linux subsystemalias open='explorer.exe';elsealias open='xdg-open';fifi
EDIT: Provided a "better" solution & I don't mind opening a PR with the above changes 😄
The text was updated successfully, but these errors were encountered:
First of thanks for sharing your dotfiles, it's been a major source of inspiration to setup my WSL2 machine lately.
So, I tried using the normalised
open
(line #144 of the.functions
file) code snippet on a WSL2 Ubuntu distro & it won't work as expected. I suspectgrep
can't read the/proc/version
file due to missingsudo
privileges(?). I bet a better solution would be togrep
the output ofuname -r
which doesn't requiresudo
privileges.A possible "better" solution could be:
EDIT: Provided a "better" solution & I don't mind opening a PR with the above changes 😄
The text was updated successfully, but these errors were encountered: