correct PATH for zshrc in windows 10 - visual-studio-code

I'm on Windows 10, installed WSL2 with Ubuntu v20 and then I installed Oh My Zsh. I thought I had everything working but when I went to type code ., in my Ubuntu terminal I got the error zsh: command not found: code.
When I do echo $PATH I get:
/home/robbie/.nvm/versions/node/v18.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/robbie/.yarn/bin
My .zshrc file looks like (I removed a bunch of the comments for this snippet):
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="agnoster"
plugins=(git node npm nvm z yarn)
source $ZSH/oh-my-zsh.sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
source /home/robbie/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
On VSCode I have the Remote WSL extension installed and set default/enabled on Ubuntu under Remote Explore.
In Windows 10 under Environment Variables, under Path I have a variable C:\Users\RobbieC\AppData\Local\Programs\Microsoft VS Code\bin
I have tried uncommenting export PATH=$HOME/bin:/usr/local/bin:$PATH - shutting down WSL, rebooting, no luck. I tried uninstalling/reinstalling the Remote WSL extension, rebooting computer, etc. No luck.

Open your regular Debian terminal App(Ensure you are in the debian home directory). Type ls -la there you will find the .zshrc file. Then remove the VScode Path you added.

Related

I cant Install NvChad ( linux ). init.lua is not detected by neovim

I'm trying to install NcChad on neovim with the following command:
git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1 && nvim
It doesn't work. I think it's because neovim can't find the init.lua file. When I rename this file to init.vim and enter neovim, it finds the file and gives an error.
Why can't neovim find init.lua?

Completely uninstall VS Code extensions in WSL

I cannot uninstall a certain VS Code extension (CodeLLDB) that is installed in my WSL. If I try with the VS Code GUI after reopening the program the extension is still there. If I try with the console the same thing happens.
I tried the following, as some answers here recommended:
$ code --list-extensions
vadimcn.vscode-lldb
That is the extension I want to uninstall, so I run:
$ code --uninstall-extension vadimcn.vscode-lldb --force
Uninstalling vadimcn.vscode-lldb...
Extension 'vadimcn.vscode-lldb' was successfully uninstalled!
But if I list them again it is still there:
$ code --list-extensions
vadimcn.vscode-lldb
Some extra details:
I use WSL 2 with Ubuntu 20.04.
Finally I found that the extensions where installed in my WSL2 in the directory ~/.vscode-server/extensions/ as this answer says, so the way to uninstall it is:
$ cd ~/.vscode-server/extensions/
$ rm -rf <extension-name>

VSCode asdf-vm command no such file or directory

Specs
VSCode 1.63.2
Homebrew 3.3.10
asdf 0.9.0
MacOS Monterey
Problem
I installed asdf via Homebrew as per doc http://asdf-vm.com/guide/getting-started.html#_3-install-asdf
The asdf command works well in my iTerm. However, it didn't work when committing or pushing via VScode terminal and VSCode source control.
The error from VSCode terminal
Unknown command: `asdf exec npm run pre-commit`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/opt/asdf/lib/commands/command-help.bash: No such file or directory
And this below from VSCode source control
The error I got in output.
> git push origin feature/my-branch
Unknown command: `asdf exec npm run pre-commit`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/opt/asdf/lib/commands/command-help.bash: No such file or directory
Running asdf exec npm run pre-commit in my iTerm works well. There must be different configuration between zsh in iTerm vs in VSCode. 🤔
My attempt so far is to add this configuration in VSCode settings.json
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.defaultProfile.osx": "zsh"
but still not working
My ~/.zshrc setup for asdf
. /usr/local/opt/asdf/libexec/asdf.sh
What is the possible cause here?
Found dubious decision
I also dont have commands folder in asdf/lib
So I copied the same from asdf/libexec/lib
And it worked

jupyterbook is not recognised as an internal or external command

I am trying to install jupyterbook on Windows 10
I do have Python3.9 installed so at the Dos prompt in c:\Users\kirst\AppData\Local\Programs\Python\Python39
I typed
py -m pip install -U jupyter-book
which placed files in the lib\site-packages folder
but when I type
jupyter-book --help
I get an error
jupyterbook is not recognised as an internal or external command
Jupyter-book.exe is in the python39\Scripts folder
changing to this folder worked.

How to open Visual Studio Code from the command line on RHEL?

I would like to open VSCode from my RHEL terminal using the code command but when I try to type Shell Command: Install 'code' command in PATH directly in VSCode Command Palette, it indicates that No matching command is found. Is there a way to configure $PATH directly via the command line to make code work?
Finally what worked for me was to run the following commands :
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
dnf check-update
sudo dnf install code