kherge/sh.env

Add an option to control defined environment variables.

kherrera-ebsco opened this issue · 1 comments

It would be nice to be able to manage environment variables through an option (i.e. option -e var).

Usage: var NAME [VALUE]
Prints or sets the value of an environment variable.

If VALUE is not given, then the value of NAME will be printed. If a value is not
set for NAME, <not set> will be printed instead. If VALUE is also provided, the
value of NAME will be set or replaced. These changes persist across sessions.

The VALUE is evaluated before it is set as an environment variable. This allows
for dynamic values such as `$HOME/.cache/by-date/$(date +%m%d)`. The evaluation
only occurs once for each session, or when the value is set.

ARGUMENTS

    NAME   The name of the environment variable.
    VALUE  The value of the environment variable.

Added: option -e var