Two ways. The first, and recommended, way is not to change your .bashrc
at all, but move lein.sh
to a directory where your shell can find it when it's looking for executables. ~/bin/
or /usr/local/bin
are the most obvious candidates. Type echo $PATH
in your terminal to find out which directories are currently on your shells PATH
.
If you insist on keeping lein.sh in its current location, you can extend the PATH
list to include the ~/Code
directory. Examples of extending PATH
are already in the bits of .bashrc
you quoted, just follow the pattern:
export PATH=$PATH:$HOME/Code
This will make everything in ~/Code
a candidate for an executable, regardless of your current working directory. It is not generally good practice.