How do you replace commands in the terminal? I want to be able to type a short command and have that be replaced with a longer one. For example, typing vscode could run something like open -a &quot;Visual Studio Code&quot;. I know this is possible in Linux, but is there any way to do this in MacOS?
Thanks in advance!
You should be able to do the same as your were doing in Linux in macOS.
As an example, if using bash, adding
alias vscode=&quot;open -a 'Visual Studio Code'&quot;

to your .bash_profile file will let you just type vscode in Terminal  to open Visual Studio Code.

Note: If you are running macOS Catalina, or later, and have not installed a more recent version of bash and are using the default zsh shell, then put aliases in your ~/.zprofile, or the appropriate file for the shell you are running.
Also, you might want to read Visual Studio Code on macOS to add the code executable to your PATH or path, depending on your shell.