Reputation: 1979
I want to open programs in Terminal by writing a single command, like what is already done for Java complilation:
javac HelloWorld.java
For any program I install, that functionality isn't available. For example, to open SWI-Prolog I have to type
/opt/local/bin/swipl
when I want to type just
swipl
which results in a -bash: swipl: command not found
. How do I create this new command?
Upvotes: 1
Views: 846
Reputation: 25337
Adjust the BASH PATH environment variable. Edit your .bash_login
or .bash_profile
in your home directory, add at the end of the file the follwing lines:
PATH=$PATH:/opt/local/bin
export PATH
Source your file or simply close the current terminal and open a new one.
Upvotes: 3