Skip to content

Instantly share code, notes, and snippets.

@caioertai
Created August 27, 2021 06:20
Show Gist options
  • Save caioertai/0a5d5206a7742ed890a9f188aab8e236 to your computer and use it in GitHub Desktop.
Save caioertai/0a5d5206a7742ed890a9f188aab8e236 to your computer and use it in GitHub Desktop.
if !(test -f "/usr/local/sbin/wslopen")
then
echo '#!/bin/bash' >> /usr/local/sbin/wslopen
echo '/mnt/c/Windows/explorer.exe "file://$(wslpath -m ${1/"file://"/})"' >> /usr/local/sbin/wslopen
chmod +x /usr/local/sbin/wslopen
fi
if [ -z $BROWSER ]
then
echo 'export BROWSER="wslopen"' >> ~/.zshrc
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment