Change all whoami calls for $USER variable

This avoid spawning additional processes, as the $USER variable will
**always** contain the current logged-in user.
Change all pwd calls for $PWD variable

This avoids spawning additional processes as $PWD **always** contains
the current working directory.
Change all hostname calls for $HOST or $SHORT_HOST
Merge pull request #3223 from mcornella/use-special-vars

Use special variables where we can
Respect original PATH definitions on install

The exporting of PATH as a fixed string would clobber any system-wide
paths added to env after installation. Instead, we now read any existing
PATH exports from previous config files and copy those from the user's
bash config, or else default to a basic prepend-only example that
respects the system environment.
Use sed instead

This needs the extra newline character defined in a variable because
shells treat the ${} expansion differently for replacing newline characters.
Change history alias into a function

This commit changes the history alias into a function which puts
the passed arguments before `-l 1`. It also provides a temporary
workaround to the lack of a `history -c` command in zsh.
This resolves #739 and resolves #789.