A new parameter is added to `_autoenv_hash_pair` to specify the version, defaulting to the latest (2). It outputs a `cksum`-based hash for version 2 and `shasum`-based for version 1.
Moves logic to check for an entry in `$AUTOENV_AUTH_FILE` into its own function (`_autoenv_authorized_pair`), as it may need to be called twice.
Modifies `_autoenv_authorized_env_file` to check for v1 entries when v2 fails.
Fixes#53. Alternative implementation to #54.
This changes the defaults:
- AUTOENV_FILE_ENTER: .env => .autoenv.zsh
- AUTOENV_FILE_LEAVE: .env_leave => .autoenv_leave.zsh
`.env` is usually used only for key-value pairs for environment
settings, e.g. with foreman. We do not want to interfere with this.
This also renames the setting/variable AUTOENV_ENV_FILENAME to
AUTOENV_AUTH_FILE, and uses the [XDG
spec](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables)
for the default location.
The new default location for the auth file will be
~/.local/share/autoenv_auth.
When the old setting is used, or the previous default exists, a warning
is given with instructions.
Fixes https://github.com/Tarrasch/zsh-autoenv/issues/31.
Closes https://github.com/Tarrasch/zsh-autoenv/pull/32.