Pwdrc 0.0.3 review

Download
by rbytes.net on

Pwdrc project executes a set of commands each time you walk in a directory with "cd"

License: GPL (GNU General Public License)
File size: 4K
Developer: AlpT
0 stars award from rbytes.net

Pwdrc project executes a set of commands each time you walk in a directory with "cd". You can associate a different set of commands to each directory.

Each time you walk in a directory the file .`whoami`_pwdrc is read and executed (if it exists), thus if your user name is "foo", your pwdrc file is ".foo_pwdrc".

WARNING:

Pwdrc executes _ONLY_ pwdrc file which are owned by your user name and
cannot be read/written/executed by anyone else than yourself. So be sure to use: chmod 600 .`whomai`_pwdrc

WARNING:

When you exit from the directory where you put a pwdrc file, Pwdrc executes the function close_pwdrc() which was defined in it. This is useful to restore aliases you have modified (see the COOKBOOK section below in this text). If you set, in your pwdrc file, the PDWRC_RECURSE variable to 1, then close_pwdrc() will be called only when you walk in a upper directory.

NOTE: Please use unique variable names in your pwdrc files, since they may collide with other pwdrc variables when PDWRC_RECURSE is enabled.
NOTE2: It is adviced to put close_pwdrc() at the beginning of your pwdrc file.

Examples:

If you want to do an `ls' each time you walk in the directory pkg/ just
do:

echo ls > pkg/.`whoami`_pwdrc
chmod 600 pkg/.`whoami`_pwdrc

In order to walk in pkg/ without executing the pwdrc file do:

cdd pkg/

Installation:

Copy http://freaknet.org/alpt/src/utils/pwdrc/pwdrc.sh in /yourpath/to/pwdrc/

Put the code below at the end of your .bashrc:

source /yourpath/to/pwdrc/pwdrc.sh

What's New in This Release:
recurse_pwdrc() has been added in the set of definable functions, and it is called each time the user walks into a sub-directory.
The "todo_remider" cookbook has been improved.
It doesn't conflict anymore if used in multiple directories, and it supports the shuffling of the output to increase the user's attention.

Pwdrc 0.0.3 search tags