My bash_profile function looks like:
function st() { /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /Users/ishan/workspace/nltk_engine/index.py;}
However, when I do st in terminal, it just opens up a sublime text window without opening the file. I copied the line in terminal and it is working. Its not working through bash_profile.
Best Answer
The
st
function which is working when you typest
is an old one which you defined interactively withinTerminal
. If you enter:you will see that this definition is not the one you entered within your
.bash_profile
.To execute the definition entered within your
.bash_profile
, you have to load it within your actual shell:or
And you will be able to check that from now on your definition of your
st
function is correct with: