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

15 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
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
986a7609ff Do not cd in the chpwd hook
This is not really necessary, except for the convenience of being in the
.env file's directory during the hook.
But it messes around with the "cd history", e.g. `cd -`!

To reference the .env file or its directory, `$autoenv_env_file` and
`${autoenv_env_file:h}` can be used instead.
2015-01-17 20:10:41 +01:00
Daniel Hahler
364c0fbb2a Remove underscore prefix from vars provided for .env files
Fixes https://github.com/Tarrasch/zsh-autoenv/issues/11
2014-12-02 18:49:23 +01:00
Daniel Hahler
d2f447e445 Use ${PWD:A} when checking for leave event
Use the absolute path when comparing to the absolute path of the
previously entered dirs.
2014-11-29 13:56:28 +01:00
Daniel Hahler
13c0dbcd2f Fix $PWD while sourcing .env file - should be dir of .env file 2014-11-25 14:39:43 +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
dbfb8fe519 Streamline cwd behavior while sourcing 2014-11-24 20:13:18 +01:00
Daniel Hahler
67e8030770 tests: add and use test_autoenv_add_to_env and test_autoenv_auth_env_files
Conflicts:
	autoenv.zsh
2014-11-24 20:13:18 +01:00
Daniel Hahler
f31bb529de s/ENV_AUTHORIZATION_FILE/AUTOENV_ENV_FILENAME/
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
b25f6b14dc Add tests for $PWD during enter and leave events 2014-11-16 12:05:16 +01:00