Skip to content

Instantly share code, notes, and snippets.

@1v
Last active October 15, 2022 13:08
Show Gist options
  • Save 1v/b21da42500389725af260c0e51c9f2dd to your computer and use it in GitHub Desktop.
Save 1v/b21da42500389725af260c0e51c9f2dd to your computer and use it in GitHub Desktop.
wsl letter_opener gem setup
bash <(curl -sL https://gist.githubusercontent.com/1v/b21da42500389725af260c0e51c9f2dd/raw/wsl.sh)

Add:

BROWSER: 'wslopen'

to application.yml

#!/usr/bin/env bash
mkdir ~/.local/bin/
echo '#!/bin/bash' >> ~/.local/bin/wslopen
echo 'explorer.exe "file://$(wslpath -m ${1/"file://"/})"' >> ~/.local/bin/wslopen
chmod +x ~/.local/bin/wslopen
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment