The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Add a scripts directory to your path

Contributed by: Michael Wells
This tip is valid for: Both BeOS and Haiku

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

PATH=$PATH:/boot/home/config/scripts

to /boot/home/config/boot/UserSetupEnvironment or /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).