I have an installed app lets call it my_app
that I wish to be able to call from the command line. It is located in /Applications/my_app.app/Contents/Resources
.
So what I was hoping to do was to have my ~/.bashrc
look like the following:
# .bashrc
my_app-start(){
export PATH=$PATH:/Applications/my_app.app/Contents/Resources/
}
and then every time I want to be able to use the app from a new terminal session I would load call my_app-start
after which I expect my app to be callable by simply typing my_app
anywhere on my system. However my terminal does not recognise the my_app-start
function... On another linux platform this works for me but perhaps Macs need some fiddling with ~/.bash_profile. I never understood the difference.
- How do I make the function automatically callable?
- Is this method a safe, sensible way of loading my application?