xdg-open google.com fails if BROWSER env var coinains spaces
I'm trying to use it with WSL (Windows Subsystem for Linux).
I put
export BROWSER="/mnt/c/Program Files/Mozilla Firefox/firefox.exe
in my ~/.bashrc
so the apps could detect the right browser.
Some of the apps I use make use of xdg-open
to open links in my web browser, but it fails with
user@user-PC:~$ xdg-open http:/google.com
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: /mnt/c/Program: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: /mnt/c/Program: not found
xdg-open: no method available for opening 'http:/google.com'
Of course, I could make a symlink with no spaces in the path, and yet I believe this is a bug in xdg-open
since linux apps are supposed to handle thing like this.
Edited by CreepySkeleton