Terminal commands not found:

homebrewpathterminal

Short explanation.

After I've created .bash_profile file and added the line export PATH=/PATH/TO/YOUR/sbt/bin:$PATH into it, my terminal stopped working properly. Could you please help me to fix the problem? enter image description here

Long explanation.
All I wanted and still want is to install Scala.
I followed this instruction:

Mac OS X If you use the homebrew package manager, simply type brew
update and then brew install sbt in a Terminal prompt.

Otherwise, install sbt by following these steps:

Verify that sbt is installed correctly: Open a new terminal (to apply
the changed .bash_profile) using the Terminal application in
/Applications/Utilities/ and type sbt -h, you should see a help
message from sbt.

First, I tried it with Homebrew and followed this instructions. It didn't work well, so I decided to go through the steps above. After I created the .bash_profile file and added the line export PATH=/PATH/TO/YOUR/sbt/bin:$PATH (with the valid path, of course), terminal went crazy. Your help is more than welcome!

EDIT:

Ina:sbt ps1$ echo $PATH

//Users/ps1/Documents/PS

Best Answer

If the path includes spaces, you're going to need to quote it.

Your line export PATH=/Users/ps1/Documents/PS 1/whatever-else/:$PATH causes Bash to interpret the PATH=/Users/ps1/Documents/PS part as the full first argument to your PATH—telling export to set the PATH to only the section before the space. If you use export "PATH=/Users/ps1/Documents/PS 1/whatever-else/:$PATH", it will interpret the entire PATH=/Users/ps1/Documents/PS 1/whatever-else/:$PATH as part of the first argument. By convention, most people only quote the right side of the equals sign, because it looks nicer, it's the only thing that needs quoted, and bash automatically concatenates strings with no spaces between them.