parf – my simple PATH tool

parf (think of Essex Man trying to say the word “path”) is a tool I wrote in a day to manage PATHs. It’s all about minimalism.

The git repo is here:
It can be built using the standard autotools toolchain. Autotools is a bit of a dark art for me, so getting it to work at all is something of a bonus.

Anyway, here’s what parf does …

parf stores its data in the configuration file ~/.parf

To add a directory as an executable path, you would issue the commands: cd /my/bin/dir ; parf -c
This basically just adds the current directory as a line in ~/.parf

When you issue the command
without arguments, it just prints the lines in ~/.parf concatenated with colons.

This makes it convenient to add directories to your PATH without messing around with scripts all the time. You can call parf -c to add a directory. In your .bashrc file, you can add the line: PATH=`parf`:$PATH

It’s a very simple way of constructing your PATH. If you decide that you no longer want a directory in your path, you can either delete it manually from the ~/.parf file, or “munge” it by, say, adding a # at the beginning of the line.

About mcturra2000

Computer programmer living in Scotland.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s