Add a scripts directory to your path
While the official place to put executable files that you’ve added to the system yourself and want to be accessible from any Terminal prompt is
/boot/home/config/bin, many people who work with a lot of scripts find it useful to store them in a separate directory, to keep them separate from the uneditable, actual binaries living there. I recommend creating a folder at
/boot/home/config/scripts for this purpose. To make this path accessible from any prompt, add the line
/boot/home/.profile. If you add it to the former, you’ll need to reboot for it to take effect. If you add it to the latter, you’ll need to open a new Terminal window (because
UserSetupEnvironment is applicable to the whole environment, whereas
.profile is read into memory every time you open a Terminal window).
Posted in Scripting
(comments are closed).