OnDir Automatic script execution

On Dir is a program that automatically executes scripts as you traverse directories at a terminal.

Example usage:

The above is accomplished with the help of ondir, some scripts added to the users (or system) startup scripts and an entry in my ~/.ondirrc for the ~/public_html path.

The entry in my ~/.ondirrc would look like this

enter /home/athomas/public_html umask 022 leave /home/athomas/public_html umask 077

In addition to executing scripts in the directory you are entering or leaving, ondir also executes scripts in directories that are traversed on the way to that directory. For example, if you are in your home directory and type:

$ cd ~/public_html/myproject