.zshrc can be found at "~/.zshrc", when ZDOTDIR is not set.
If ZDOTDIR is set, .zshrc is in "${ZDOTDIR}/.zshrc".
Using parameter expansion, the hardcoded path can be replaced with
"${ZDOTDIR:-$HOME}/.zshrc". That way, it'll use the value in
ZDOTDIR when set and the value in HOME when not.
This thus mirrors the usage of ZDOTDIR in zsh and makes the code
more fexible.
Adds support for OS X's default bash configuration file,
~/.bash_profile, and more logging during install about
which file, if any, got the source line added.
Replace bashisms with syntax supported by all posix-compliant shells.
The echo command does not support -e in many simplified shells
(including dash) so printf is favored. The [[ ... ]] notation is also
not accepted by all posix shells so [ ... ] notation is used instead.