1
0
mirror of https://github.com/Tarrasch/zsh-autoenv.git synced 2024-11-16 13:20:59 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
Daniel Hahler
e68a914487 Change default values: .env => .autoenv.zsh etc
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.
2015-05-22 17:20:06 +02:00
Daniel Hahler
b0e23d29fe Change default for AUTOENV_FILE_LEAVE to .env_leave
This does not use a fake file extension (`.leave`) like with
`.env.leave`.
2015-05-06 20:28:23 +02:00
Daniel Hahler
470841ac3c Unset $autoenv_env_file when leaving
This allows to use $autoenv_env_file e.g. in your prompt to see what
.env is being used.
2015-04-24 17:36:41 +02:00
Daniel Hahler
7699fe6aba tests: rename setup.sh to setup.zsh 2015-04-23 16:03:21 +02:00
Daniel Hahler
5cb689875e tests: abort if setup fails!
Otherwise the user's auth file might get removed.
2015-01-25 19:48:56 +01:00
Daniel Hahler
873b9f8062 Fix symlink handling, especially for symlinks not below "env_dir" 2015-01-19 19:03:26 +01:00
Daniel Hahler
9c829733ad tests: setup for multiple ZDOTDIRs, fix/add "setopt clobber" 2014-12-08 22:14:54 +01:00
Daniel Hahler
5e18125f04 Improve interactive prompt
- Revert usage of "read -q" for authentication (#10)
 - Change format of "not authenticated" message (#9)
2014-11-27 13:33:04 +01:00
Daniel Hahler
bcec00d2dd Use AUTOENV prefix
- s/DOTENV_/AUTOENV_/
 - s/dotenv_/autoenv_/

Ref: https://github.com/Tarrasch/zsh-autoenv/issues/6
2014-11-24 20:13:18 +01:00
Daniel Hahler
c1a25d724e tests: add setup script, used to be for all tests 2014-11-24 20:13:18 +01:00
Daniel Hahler
1d3e5b69a7 Add a test for DOTENV_HANDLE_LEAVE=0 2014-11-15 15:25:20 +01:00
Daniel Hahler
4676713bc6 Various improvements
- Support for leave event, via DOTENV_FILE_LEAVE and _dotenv_event (can
   use DOTENV_FILE_LEAVE=$DOTENV_FILE_ENTER).
 - Support for searching upwards for $DOTENV_FILE_ENTER (#3).
 - Source .env only once per session, but re-source when leave events
   are enabled (#1).
 - Trigger the machinery when the script gets sourced, for the current
   dir (#2).
2014-11-15 15:08:52 +01:00