You have multiple problems here.
The first command code ~/.zshrc
is meant to open the file .zshrc
located inside your home folder /Users/ocwri
(~
is an alias of the home folder) with Visual Studio Code (= code
).
It failed with the message command not found: code
because ZSH (= your terminal) does not know where VSCode is located. You have to edit a variable named PATH
to tell it where to look but a bit more friendly way you can do this is to open your home folder from Visual Studio Code directly and look for a file named .zshrc
.
If the file .zshrc
does not exists, you can create it from VS Code. You will have to make it executable with the command chmod u+x ~/.zshrc
.
You should write the export
command inside the file .zshrc
. You have to remove the <
and >
characters. It is used to tell you "please replace this value by yours".
You have the same problem with pdc
than you have with code
. Your terminal does not know where it is located.
To fix this, you should add the following line inside .zshrc
after export PLAYDATE_SDK_PATH
:
export PATH=$PATH:$PLAYDATE_SDK_PATH/bin
The PATH variable list every folder where ZSH have to look to find commands (separated by :
).
About the command $ pdc MyGameSource MyGame.pdx
. The dollar sign is not something you have to write. It is a separator displayed in most terminal before the prompt. Your terminal is using %
for the same thing (there is no difference, don't worry).
MyGameSource
is the name of the folder containing main.lua
. In your case, you are already inside the folder containing main.lua
so you can use .
(= current folder) instead. However I recommend that you create a folder named Source
and move your main.lua
inside it.
Edit: changes made to the .zshrc
file are loaded when you start a new terminal or when you run it:
~/.zshrc