New answers tagged

3

Your function doesn't work because OS X starts your shell as a login shell, thus .bashrc isn't read. I wouldn't use a function in this case. If there is only one executable file in /Applications/my_app.app/Contents/Resources/ then I would use an alias. I would use separate files when changing your environment. Set your PATH and whatever in these/this file(s)...


2

Why not just create a symlink in /usr/local/bin? ln -s /foo/bar/hello_world.app /usr/local/bin/hello_world.app You won't have to create any functions in .bashrc In fact, what I have done with scripts that I have written that have multiple versions, is create a symlink to a file with the text "-latest" and then copy the latest version into that file. My ...


0

The loginwindow process sets a user's environment. It sets the variables TMPDIR and PATH, consults Directory Services and sets SHELL HOME USER LOGNAME . PATH is set to /usr/bin:/bin:/usr/sbin:/sbin unless modified by launchd (in the more current versions of OS X). This is the PATH variable available to the user's processes unless modified by that particular ...



Top 50 recent answers are included