Vared - Editing environment variables made easy

Have you ever missed vared in your favourite shell? You know, this small thing which lets you edit environment variables without doing all this echo $FOO, copy&paste and setenv FOO stuff. With vared you can use readline editing features to manipulate the value of an environment variable. After committing the changes the new value of the edited environent variable is imported into the current environment.

Using vared

How it works

Vared in fact consists of two parts:

  • Varedit as the first part is a hack which presets a readline editor with the value of a given environment variable. After manipulating the value it is written to a temporary file (OMG, that's ugly). The format of the output is specified by a format string. Placeholders for the variables name and its value are supported. This makes varedit independent from your shell.
  • The second part is a piece of shell code which creates a shell alias or a shell function (depending on the shell you are using) named vared. It is a convenient interface to varedit and hides the nasty shell specific details from the user. The new value of the variable is 'imported' into the current environment by this alias.

Installation and Usage

Installation is an easy one. Just download the package, unpack it and follow the README.

Feedback

Feel free to contact me (pkgs@c0t0d0s0.de) and tell me your opinion about Vared. I'm a (t)csh-user (You should know why ;-), so interoperability with other shells isn't tested very well. I like to hear which shell you are using and how it can be expanded with Vared.

Downloads

License

All Vared stuff is released under the GNU General Public License, Version 2.

Impressum