Skip to content

Instantly share code, notes, and snippets.

@itzg
Created July 18, 2020 14:50
Show Gist options
  • Select an option

  • Save itzg/61dc5aeb4c0d6ddde927efc3376c99f2 to your computer and use it in GitHub Desktop.

Select an option

Save itzg/61dc5aeb4c0d6ddde927efc3376c99f2 to your computer and use it in GitHub Desktop.
oh-my-zsh custom plugin that helps me develop from within WSL2

Create the directory $ZSH_CUSTOM/wsl-helpers and place the wsl-helpers.plugins.zsh file in that directory.

function open() {
if [ $# = 0 ]; then
set -- .
fi
explorer.exe "$@"
}
alias ps=powershell.exe
function idea() {
if [ $# = 0 ]; then
set -- .
fi
ideaExe=$(awk '/^start / {print $3}' $(which idea.cmd) | sed -e 's#C:#/mnt/c#' -e 's#\\#/#g')
"$ideaExe" "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment