Environment variables

HLG_HOME

hlg only looks for one variable, the $HLG_HOME

This is the variable that determines where hlg stores its Configuration files. If this variable is not set, hlg uses $HOME/.hlg

For example, if we want to store our configuration files in $HOME/.config/hlg instead of the default, we do:

  1. Open your shell settings file (for example, .bashrc or .zshrc)

  2. Add this line that will set the $HLG_HOME for this and future sessions:

    export HLG_HOME=$HOME/.config/hlg
  3. Save the file and close it.

  4. Finally, refresh the environment by calling:

    source .bashrc
  5. Just substitute .bashrc for your shell.

  6. From now on, hlg wil use this new location to store its files.

Changing your HLG_HOME variable after you had used hlg will result in hlg recreating the new setup. It will no longer read your old settings and even your bookmarks.

In that case,

  • Before you change the variable, you can move the old ~/.hlg directory to the new location; or

  • After you have changed the variable, you can simply override the new directory created by hlg by moving over the old directory to the new directory.

PATH

hlg also uses your $PATH variable to lookup for programs that are entered in the "handler" field that do not have absolute paths.

If the program you enter cannot be run from within your shell unless you provide its absolute path, then in the handler field, you must also enter its absolute path.

Alternatively, you have to consider adding the location of the handler to the $PATH environment variable. Just bear in mind that whenever you want to add a new path to the PATH variable, you are dealing with a system variable.

Because of that,, instead of simply exporting the PATH variable, you have to append so that you do not clobber the existing PATH value.

For example, to add a custom path for ruby gems found at $HOME/.gems/bin you would do it like this:

export PATH=$PATH:$HOME/.gems/bin