I have a problem with the $PATH,

Hello all 👋, I have a problem when I come to add the vs code path to the terminal to use the (code .), it is added as well, but when I turn off or make the mac sleep and turn it on again, the path gone, so when I come back write into the terminal (code .) it give me this error message again zsh: command not found: code .

I'm using a MacBook pro m1, with version 12.5.1 (21G83).

Please I need help🙏 Thanks all❤️🧑‍💻

First of all use of emojis offends my sensibilities... that is all.

As for $path you should edit ~/.zshrc and add whatever directories you need to the path variable. example:

# a common directory on the user $path:
path+=/Users/username/bin #this is often used by users that need a place for custom bash/zsh scripts or just compiled programs.  ;)

This will execute every time a user logs in.

As a side-note: if you do have a ~/bin directory you should probably sudo chmod -R 711 ~/bin...

I have a problem with the $PATH,
 
 
Q