Running a command or script in terminal from anywhere by adding it to the PATH, what am I doing wrong?
- by Joe
On osx/linux I want to be able to run a command/script on the terminal from anywhere which links to a program.
ie I want to be able to run:
alloy
that runs:
/usr/local/share/npm/lib/node_modules/alloy/bin/alloy
I'm guessing adding to .bashrc is the best way? I've tried running:
export PATH="$PATH:/usr/local/share/npm/lib/node_modules/alloy/bin"
and also:
export PATH="$PATH:/usr/local/share/npm/lib/node_modules/alloy/bin/alloy"
Then I started a new terminal window but the alloy command doesnt work. Am I missing something?