Skip to content

Instantly share code, notes, and snippets.

@DavidLiedle
Created July 21, 2019 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidLiedle/1576f3850b9489b3a65c0bda84c1891f to your computer and use it in GitHub Desktop.
Save DavidLiedle/1576f3850b9489b3a65c0bda84c1891f to your computer and use it in GitHub Desktop.
A shell script to run inside of WSL on Windows, to open code-insiders VSCode within WSL
#!/usr/bin/env bash
################################################################################
# win: open in windows from WSL
#
# usage: win ~/directory/name/here
#
mkdir -p ~/.logs
if [ -d $1 ]; then
cd $1
code-insiders $1 &> ~/.logs/win.log &
fi
@DavidLiedle
Copy link
Author

Save as ~/bin/win when ~/bin is on your WSL Linux instance PATH. Invoke with, e.g. win ~/my_project to open VSCode Insider Edition in a live session from within WSL. Tested with WSL2 inside Ubuntu 18.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment