Skip to content

Instantly share code, notes, and snippets.

@WebReflection
Created October 23, 2023 14:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WebReflection/aaf440e25071bbe135488d7312ff463f to your computer and use it in GitHub Desktop.
Save WebReflection/aaf440e25071bbe135488d7312ff463f to your computer and use it in GitHub Desktop.
WSL open a new TAB (not window) on the same folder

I've saved this file as /usr/local/bin/new-tab but I think there is a way to configure it as Ctrl+Shift+T shortcut somehow, yet I really wanted to write this down as I've lost 20 minutes of my life to have WSL behaving just like any regular Linux distro in a console/terminal.

#!/usr/bin/env sh

cmd.exe /c wt.exe wt -w 0 nt -d "$(pwd)" -p "$WSL_DISTRO_NAME"

If you have better tips, hints, or follow ups, you're more than welcome to share, thank you!

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