DEV Community

Discussion on: Open File Explorer and Browser from ZSH

Collapse
 
equiman profile image
Camilo Martinez • Edited

I've tested with start from WSL2 and doesn't work.

start .
zsh: command not found: start
Enter fullscreen mode Exit fullscreen mode

I think only works with the default Windows console.

I've changed the title to avoid confusion.

Collapse
 
ogza profile image
Oğuz Akankan • Edited
  1. Open your terminal and go to the root path
cd ~
Enter fullscreen mode Exit fullscreen mode
  1. open the .zshrc file via
 nano .zshrc
Enter fullscreen mode Exit fullscreen mode

And add this alias code at the end of the line:

alias code="/mnt/c/Program\ Files/Microsoft\ VS\ Code/Code.exe
Enter fullscreen mode Exit fullscreen mode

Save the file (ctrl + x) and exit.

  1. restart your terminal and go into any folder in your terminal and try:
code .
Enter fullscreen mode Exit fullscreen mode