Score:0

After attempting to set up code . on my wsl environment, commands have stopped working

cx flag

I inserted export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" in ~/.zshrc and after saving and quitting, my commands stopped working. I can't access the rc file to modify it in any way as far as I know. nvim/vi do not work either.

hr flag
If you've broken your PATH, you can still use programs by their full path ex. `/usr/bin/vi ~/.zshrc`
Score:1
vn flag

A few notes:

  • First, for recovery, exit Ubuntu and wsl ~ -e zsh -f. This should start Zsh without processing your ~/.zshrc. Alternatively, wsl ~ -e bash --noprofile --norc if the first version doesn't work.

    You can then correct any mistakes in your startup files.

  • More importantly, it looks like you are trying to use the Linux version of Visual Studio Code under WSL. While this should work, VSCode and WSL are designed for interoperability using the Windows version of VSCode.

    I would recommend:

    The Windows version of VSCode is added to the Windows path automatically, which should be appended to the Linux/WSL path automatically assuming you haven't disabled that feature in /etc/wsl.conf.

    When you call code ., a shell script provided by VSCode will install a server in your home directory which it will use to communicate with your WSL distribution.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.