]> Sergey Matveev's repositories - zsh-autoenv.git/log
zsh-autoenv.git
2 years agoUsage examples master
Sergey Matveev [Fri, 19 Nov 2021 09:22:10 +0000 (12:22 +0300)]
Usage examples

2 years agoRemoved unused files
Sergey Matveev [Fri, 14 May 2021 09:47:27 +0000 (12:47 +0300)]
Removed unused files

2 years agoSimplify and lower LoC
Sergey Matveev [Fri, 14 May 2021 07:54:05 +0000 (10:54 +0300)]
Simplify and lower LoC

5 years agoREADME: improve .venv example
Daniel Hahler [Fri, 14 Sep 2018 02:01:21 +0000 (04:01 +0200)]
README: improve .venv example

5 years agoAdd helper functions for $PATH manipulation (#90)
Daniel Hahler [Fri, 14 Sep 2018 01:46:43 +0000 (03:46 +0200)]
Add helper functions for $PATH manipulation (#90)

6 years agoHandle `setopt shwordsplit` (#89)
Daniel Hahler [Sat, 16 Dec 2017 00:09:41 +0000 (01:09 +0100)]
Handle `setopt shwordsplit` (#89)

This uses `emulate -L zsh` (as a more broad approach to `setopt
localtoptions noshwordsplit`, or quoting things) in the entry points to
zsh-autoenv.

Fixes https://github.com/Tarrasch/zsh-autoenv/issues/75

6 years agoOptimize _autoenv_stack_entered_contains (#88)
Daniel Hahler [Sat, 16 Dec 2017 00:04:13 +0000 (01:04 +0100)]
Optimize _autoenv_stack_entered_contains (#88)

Only make `$env_file` absolute once.

6 years agoOptimize _autoenv_authorized_env_file
Daniel Hahler [Fri, 15 Dec 2017 23:54:54 +0000 (00:54 +0100)]
Optimize _autoenv_authorized_env_file

This uses Zsh directly, instead of calling grep potentially twice for a
missing entry.

6 years ago_autoenv_hash_pair: use sha1sum for v1 hashes
Daniel Hahler [Fri, 15 Dec 2017 22:41:44 +0000 (23:41 +0100)]
_autoenv_hash_pair: use sha1sum for v1 hashes

shasum was replaced by sha1sum before, and appears to have been added
back accidentally in dfb5648.

6 years agoTravis: only run two jobs, using test_full
Daniel Hahler [Fri, 15 Dec 2017 22:33:11 +0000 (23:33 +0100)]
Travis: only run two jobs, using test_full

6 years agotests: mv ZDOTDIR.{clobber,options}
Daniel Hahler [Fri, 15 Dec 2017 21:34:08 +0000 (22:34 +0100)]
tests: mv ZDOTDIR.{clobber,options}

6 years agotests: simplify ZDOTDIR setup, remove base
Daniel Hahler [Fri, 15 Dec 2017 22:15:00 +0000 (23:15 +0100)]
tests: simplify ZDOTDIR setup, remove base

This makes it easier to run tests without providing ZDOTDIR.

6 years agoAdd requirements to README
Daniel Hahler [Fri, 15 Dec 2017 22:34:53 +0000 (23:34 +0100)]
Add requirements to README

Zsh version 4.3.10 introduced the `:a` and `:A` modifiers that are used.

[ci skip]

6 years agotests: cleanup test_full (#86)
Daniel Hahler [Fri, 15 Dec 2017 22:24:12 +0000 (23:24 +0100)]
tests: cleanup test_full (#86)

Changes tests/varstash_export.t to use `$TESTSHELL` provided by cram.

6 years agoTravis: actually use different ZDOTDIRs (#83)
Daniel Hahler [Fri, 15 Dec 2017 22:11:20 +0000 (23:11 +0100)]
Travis: actually use different ZDOTDIRs (#83)

6 years ago_autoenv_hash_pair: do not use a subshell (#81)
Daniel Hahler [Fri, 15 Dec 2017 14:59:11 +0000 (15:59 +0100)]
_autoenv_hash_pair: do not use a subshell (#81)

As a side-effect this should fix
https://github.com/Tarrasch/zsh-autoenv/issues/39 in case it was still
an issue after all.

6 years agoFIX: Compatibility with macOS/FreeBSD (#82)
Rob Speed [Fri, 15 Dec 2017 14:58:39 +0000 (09:58 -0500)]
FIX: Compatibility with macOS/FreeBSD (#82)

Removed use of `sed` due to its behavior differing between GNU Coreutils and FreeBSD.

6 years agoTravis: sudo=false, language=generic (#74)
Daniel Hahler [Thu, 14 Dec 2017 00:19:50 +0000 (01:19 +0100)]
Travis: sudo=false, language=generic (#74)

6 years agominor: fix doc / improve debug logging (#80)
Daniel Hahler [Thu, 14 Dec 2017 00:18:44 +0000 (01:18 +0100)]
minor: fix doc / improve debug logging (#80)

6 years agoFix tests: match $CRAMTMP more losely (#78)
Daniel Hahler [Wed, 13 Dec 2017 23:53:53 +0000 (00:53 +0100)]
Fix tests: match $CRAMTMP more losely (#78)

Fixes https://github.com/Tarrasch/zsh-autoenv/issues/76.

6 years agoFix (auto)unstashing when being sourced from a subdir (#79)
Daniel Hahler [Wed, 13 Dec 2017 23:53:25 +0000 (00:53 +0100)]
Fix (auto)unstashing when being sourced from a subdir (#79)

Fixes https://github.com/Tarrasch/zsh-autoenv/issues/77.

6 years agoREADME: recipes: fix "Environment file for all project" to use :a
Daniel Hahler [Thu, 2 Nov 2017 01:41:16 +0000 (02:41 +0100)]
README: recipes: fix "Environment file for all project" to use :a

Ref: https://github.com/Tarrasch/zsh-autoenv/pull/73

6 years ago_autoenv_get_file_upwards: do not dereference symlinks (#73)
Rob Speed [Thu, 2 Nov 2017 01:40:45 +0000 (21:40 -0400)]
_autoenv_get_file_upwards: do not dereference symlinks (#73)

This prevents issues where autoenv scripts use $0. When a shell enters the directory holding the autoenv scripts, it works as expected with $0 being the path to the symlink. However, if the shell enters one of its child directories the path to the script is dereferenced, and $0 is instead the path to the symlink's target.

From `man 1 zshexpn`:

> A – Turn a file name into an absolute path as the 'a' modifier does, and then pass  the  result  through  the  realpath(3) library function to resolve symbolic links.

Note: Symlinks are dereferenced elsewhere for authorization, so that behavior is unchanged.

6 years agoMerge pull request #71 from blueyed/minor
Daniel Hahler [Tue, 17 Oct 2017 22:32:08 +0000 (00:32 +0200)]
Merge pull request #71 from blueyed/minor

Minor code cleanup/optimization

6 years agoSet varstash_dir for "leave" event (#72)
Daniel Hahler [Tue, 17 Oct 2017 22:31:43 +0000 (00:31 +0200)]
Set varstash_dir for "leave" event (#72)

Fixes https://github.com/Tarrasch/zsh-autoenv/issues/45.

6 years agoCleanup README (#70)
Daniel Hahler [Tue, 17 Oct 2017 22:29:43 +0000 (00:29 +0200)]
Cleanup README (#70)

Fix issues reported by mdl and remove the unnecessary bitdeli badge.

6 years ago_autoenv_source: grep for unstash also
Daniel Hahler [Sat, 19 Aug 2017 13:39:57 +0000 (15:39 +0200)]
_autoenv_source: grep for unstash also

Just for consistency.

6 years agoBetter fix for return value of _autoenv_source
Daniel Hahler [Sat, 19 Aug 2017 12:50:20 +0000 (14:50 +0200)]
Better fix for return value of _autoenv_source

Follow up to 8763a5b.

6 years agoMinor code cleanup/optimization
Daniel Hahler [Sat, 19 Aug 2017 12:28:03 +0000 (14:28 +0200)]
Minor code cleanup/optimization

6 years agoImprove debug logging in _autoenv_chpwd_handler (#57)
Daniel Hahler [Sat, 19 Aug 2017 11:55:35 +0000 (13:55 +0200)]
Improve debug logging in _autoenv_chpwd_handler (#57)

6 years agominor: doc; improve autostash check
Daniel Hahler [Fri, 18 Aug 2017 14:20:51 +0000 (16:20 +0200)]
minor: doc; improve autostash check

6 years agoMinor cleanup
Daniel Hahler [Fri, 18 Aug 2017 13:27:32 +0000 (15:27 +0200)]
Minor cleanup

6 years agoAdd autoenv-edit function to edit current env files (#68)
Daniel Hahler [Fri, 11 Aug 2017 12:15:46 +0000 (14:15 +0200)]
Add autoenv-edit function to edit current env files (#68)

6 years ago_autoenv_get_file_upwards: handle relative paths (#67)
Daniel Hahler [Fri, 11 Aug 2017 08:33:40 +0000 (10:33 +0200)]
_autoenv_get_file_upwards: handle relative paths (#67)

If `$look_from` is `.` the resulting file path will be relative.

6 years ago_autoenv_get_file_upwards: handle relative paths
Daniel Hahler [Fri, 11 Aug 2017 08:26:38 +0000 (10:26 +0200)]
_autoenv_get_file_upwards: handle relative paths

If `$look_from` is `.` the resulting file patch will be relative.

6 years agoREADME: improve recipe for virtualenv auto-activation
Daniel Hahler [Wed, 24 May 2017 16:02:47 +0000 (18:02 +0200)]
README: improve recipe for virtualenv auto-activation

- check that VIRTUAL_ENV is non-empty, which might happen when
`deactivate` was called already.
- perform directory name abbreviation on the virtualenv path.

6 years agoFix use of local in while loop. (#66)
Daniel Hahler [Tue, 16 May 2017 20:58:25 +0000 (22:58 +0200)]
Fix use of local in while loop. (#66)

For some reason it did not fail on Travis when only pushing the test
first?!

Also adds punctuation to already-stashed msg.

6 years agoAUTOENV_DEBUG=3 sets xtrace while sourcing; doc (#65)
Daniel Hahler [Sun, 30 Apr 2017 12:14:25 +0000 (14:14 +0200)]
AUTOENV_DEBUG=3 sets xtrace while sourcing; doc (#65)

7 years agoFix recipe: ensure that extendedglob is set (#64)
Daniel Hahler [Thu, 27 Apr 2017 20:39:52 +0000 (22:39 +0200)]
Fix recipe: ensure that extendedglob is set (#64)

7 years agoMerge pull request #63 from blueyed/varstash-fixes
Daniel Hahler [Thu, 27 Apr 2017 18:19:17 +0000 (20:19 +0200)]
Merge pull request #63 from blueyed/varstash-fixes

Varstash fixes

7 years agominor: sync lib/varstash
Daniel Hahler [Sun, 23 Apr 2017 19:49:01 +0000 (21:49 +0200)]
minor: sync lib/varstash

7 years agolib/varstash: simplify stash for Zsh
Daniel Hahler [Sun, 23 Apr 2017 19:55:34 +0000 (21:55 +0200)]
lib/varstash: simplify stash for Zsh

7 years agolib/varstash: fix handling of exported vars with Zsh 5.3+
Daniel Hahler [Sun, 23 Apr 2017 19:49:06 +0000 (21:49 +0200)]
lib/varstash: fix handling of exported vars with Zsh 5.3+

Upstream PR: https://github.com/cxreg/smartcd/pull/51

7 years agoREADME: add Recipes section with .venv activation (#58)
Daniel Hahler [Sun, 23 Apr 2017 22:41:27 +0000 (00:41 +0200)]
README: add Recipes section with .venv activation (#58)

7 years agotests: fixes for noclobber (#62)
Daniel Hahler [Sun, 23 Apr 2017 20:11:55 +0000 (22:11 +0200)]
tests: fixes for noclobber (#62)

7 years agoMakefile: allow to pass in TEST_SHELL (#60)
Daniel Hahler [Sun, 23 Apr 2017 12:26:22 +0000 (14:26 +0200)]
Makefile: allow to pass in TEST_SHELL (#60)

7 years agotests: test_autoenv_add_to_env: create auth file parent dir (#59)
Daniel Hahler [Sun, 23 Apr 2017 12:24:17 +0000 (14:24 +0200)]
tests: test_autoenv_add_to_env: create auth file parent dir (#59)

This is required when running single test files, e.g. only cwd.t.

7 years agoAutomatically upgrade v1 hashes (SHA-1) to v2 (`cksum`) (#55)
Rob Speed [Tue, 10 Jan 2017 11:07:39 +0000 (06:07 -0500)]
Automatically upgrade v1 hashes (SHA-1) to v2 (`cksum`) (#55)

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.

7 years agoUse cksum instead of sha1sum for checksums (#54)
Daniel Hahler [Thu, 5 Jan 2017 00:16:21 +0000 (01:16 +0100)]
Use cksum instead of sha1sum for checksums (#54)

This provides better performance, but requires you to re-authenticate all files.

Fixes https://github.com/Tarrasch/zsh-autoenv/issues/53.

7 years ago_autoenv_hash_pair: use sha1sum (C) instead of shasum (Perl) (#52)
Daniel Hahler [Thu, 15 Dec 2016 09:36:35 +0000 (10:36 +0100)]
_autoenv_hash_pair: use sha1sum (C) instead of shasum (Perl) (#52)

This improves performance.

7 years agoBetter ~/.env_auth deprecation hint (#51)
Arash Rouhani [Tue, 29 Nov 2016 15:50:32 +0000 (22:50 +0700)]
Better ~/.env_auth deprecation hint (#51)

Don't print the dot so it's easier to copy and paste.

7 years agoAdd a test for autostashing aliases (#44)
Daniel Hahler [Tue, 29 Nov 2016 14:46:50 +0000 (15:46 +0100)]
Add a test for autostashing aliases (#44)

Ref: https://github.com/Tarrasch/zsh-autoenv/issues/43

7 years agoCreate path to non-existing auth file (#49)
Daniel Hahler [Wed, 15 Jun 2016 23:45:25 +0000 (01:45 +0200)]
Create path to non-existing auth file (#49)

This changes the tests to have the auth file in a non-existing subdir
always, as with `$HOME/.local/share` not being there already.

Fixes https://github.com/Tarrasch/zsh-autoenv/issues/48.

7 years agoadd zplug usage (#46)
wikibootup [Fri, 27 May 2016 02:33:06 +0000 (11:33 +0900)]
add zplug usage (#46)

8 years agoOnly source varstash lib if it's being used
Daniel Hahler [Tue, 26 Apr 2016 18:07:33 +0000 (20:07 +0200)]
Only source varstash lib if it's being used

I have noticed that `autostash` called an (accidentally)
defined/overwritten `stash` function.

While it's not possible to put this into a local scope, this will at
least make it less polluting by default (when autostashing is not used).

Additionally we could source it always (not just once), but then it
would only re-overwrite the function.

A better fix would be to prefix the functions explicitly, e.g.
`autoenv_autostash` etc.

Closes https://github.com/Tarrasch/zsh-autoenv/pull/42.

8 years ago_autoenv_ask_for_yes: handle/catch Ctrl-C and return
Daniel Hahler [Sun, 6 Mar 2016 19:27:15 +0000 (20:27 +0100)]
_autoenv_ask_for_yes: handle/catch Ctrl-C and return

8 years agoQuote assignments to pair/parent_file
Daniel Hahler [Sun, 6 Mar 2016 19:26:48 +0000 (20:26 +0100)]
Quote assignments to pair/parent_file

8 years agoAdd comment for "autoenv_debug: fix error with Zsh 5.0.5"
Daniel Hahler [Wed, 18 Nov 2015 18:28:33 +0000 (19:28 +0100)]
Add comment for "autoenv_debug: fix error with Zsh 5.0.5"

8 years agoMakefile: test_full: use exit instead of return
Daniel Hahler [Wed, 18 Nov 2015 18:25:34 +0000 (19:25 +0100)]
Makefile: test_full: use exit instead of return

8 years agoAdd tests/ZDOTDIR.shwordsplit
Daniel Hahler [Wed, 18 Nov 2015 18:25:07 +0000 (19:25 +0100)]
Add tests/ZDOTDIR.shwordsplit

8 years ago_autoenv_debug: fix error with Zsh 5.0.5
Daniel Hahler [Wed, 18 Nov 2015 18:23:05 +0000 (19:23 +0100)]
_autoenv_debug: fix error with Zsh 5.0.5

> _autoenv_debug:local:1: not valid in this context: handler:

Fixes https://github.com/Tarrasch/zsh-autoenv/issues/38.

8 years agoREADME: add direnv to 'Related projects'
Daniel Hahler [Thu, 12 Nov 2015 21:30:55 +0000 (22:30 +0100)]
README: add direnv to 'Related projects'

8 years agoMerge pull request #36 from blueyed/fix-api-vars-scope
Daniel Hahler [Sat, 10 Oct 2015 20:35:41 +0000 (22:35 +0200)]
Merge pull request #36 from blueyed/fix-api-vars-scope

Cleanup API/vars for enter/leave events

8 years agoMerge pull request #37 from blueyed/limit-autoenv_source_parent
Daniel Hahler [Sat, 10 Oct 2015 20:35:28 +0000 (22:35 +0200)]
Merge pull request #37 from blueyed/limit-autoenv_source_parent

Allow to limit `autoenv_source_parent`'s upward recursion

8 years agoAllow to limit `autoenv_source_parent`'s upward recursion
Daniel Hahler [Fri, 9 Oct 2015 20:13:36 +0000 (22:13 +0200)]
Allow to limit `autoenv_source_parent`'s upward recursion

This allows to use `autoenv_source_parent ..` to only look in the parent
directory.

8 years agoCleanup API/vars for enter/leave events
Daniel Hahler [Fri, 9 Oct 2015 20:04:55 +0000 (22:04 +0200)]
Cleanup API/vars for enter/leave events

The variables are local now, which makes them being handled correctly
when calling `autoenv_source_parent`.
Without this, a call to `autoenv_source_parent` overwrites the values in
the current scope.

8 years agodoc: fix appearance of AUTOENV_DEBUG in README
Daniel Hahler [Fri, 18 Sep 2015 12:48:57 +0000 (14:48 +0200)]
doc: fix appearance of AUTOENV_DEBUG in README

8 years agoUse shorter echo for newlines
Daniel Hahler [Thu, 27 Aug 2015 20:58:35 +0000 (22:58 +0200)]
Use shorter echo for newlines

8 years agoUse 'command cat'
Daniel Hahler [Thu, 27 Aug 2015 20:57:56 +0000 (22:57 +0200)]
Use 'command cat'

Ref: https://github.com/Tarrasch/zsh-autoenv/pull/35#discussion_r38145031

8 years agoWrite _autoenv_check_authorized_env_file to stderr
Daniel Hahler [Thu, 27 Aug 2015 18:50:52 +0000 (20:50 +0200)]
Write _autoenv_check_authorized_env_file to stderr

stdout might be redirected, e.g. with "cd - >/dev/null", and this
message should appear in stderr probably anyway.

I've tried to add a test for this, by redirecting stdout in .zshenv, but
cram does not handle this well (and appears to redirect stderr to stdout
anyway).

8 years agoRemove globals: _autoenv_source_dir, _autoenv_chpwd_prev_dir
Daniel Hahler [Mon, 25 May 2015 15:01:43 +0000 (17:01 +0200)]
Remove globals: _autoenv_source_dir, _autoenv_chpwd_prev_dir

The globals are not necessary and can cause problems with
AUTO_NAME_DIRS.

 - Use funcsourcetrace[1] instead of _autoenv_source_dir.
 - Use OLDPWD instead of _autoenv_chpwd_prev_dir.

Fixes #33.

8 years agoChange default values: .env => .autoenv.zsh etc
Daniel Hahler [Thu, 21 May 2015 21:58:26 +0000 (23:58 +0200)]
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.

8 years agoREADME: clarify that it won't load any .env file
Daniel Hahler [Wed, 13 May 2015 23:36:33 +0000 (01:36 +0200)]
README: clarify that it won't load any .env file

8 years agominor: doc for _autoenv_hash_pair
Daniel Hahler [Sat, 9 May 2015 16:25:32 +0000 (18:25 +0200)]
minor: doc for _autoenv_hash_pair

8 years agoUpdate README.md
Arash Rouhani [Wed, 6 May 2015 19:33:40 +0000 (21:33 +0200)]
Update README.md

blueyed: fixed some punctuation/grammar.

Closes https://github.com/Tarrasch/zsh-autoenv/pull/28.

8 years agoMerge pull request #27 from blueyed/add-doc
Arash Rouhani [Wed, 6 May 2015 19:24:28 +0000 (21:24 +0200)]
Merge pull request #27 from blueyed/add-doc

Huge update of the README (finally)

8 years agoMerge pull request #26 from blueyed/rename-env-leave
Arash Rouhani [Wed, 6 May 2015 19:19:06 +0000 (21:19 +0200)]
Merge pull request #26 from blueyed/rename-env-leave

Change default for AUTOENV_FILE_LEAVE to .env_leave

8 years agoHuge update of the README (finally)
Daniel Hahler [Wed, 6 May 2015 18:42:42 +0000 (20:42 +0200)]
Huge update of the README (finally)

8 years agoChange default for AUTOENV_FILE_LEAVE to .env_leave
Daniel Hahler [Wed, 6 May 2015 18:28:23 +0000 (20:28 +0200)]
Change default for AUTOENV_FILE_LEAVE to .env_leave

This does not use a fake file extension (`.leave`) like with
`.env.leave`.

9 years agoUnset $autoenv_env_file when leaving
Daniel Hahler [Fri, 24 Apr 2015 15:36:37 +0000 (17:36 +0200)]
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.

9 years agotests: streamline ZDOTDIR layout, AUTOENV_ENV_FILENAME via setup
Daniel Hahler [Fri, 24 Apr 2015 15:33:09 +0000 (17:33 +0200)]
tests: streamline ZDOTDIR layout, AUTOENV_ENV_FILENAME via setup

Without this, a new subshell would reset the env authentication file.

9 years agoDo not export AUTOENV_ENV_FILENAME, and use existing value
Daniel Hahler [Fri, 24 Apr 2015 15:28:09 +0000 (17:28 +0200)]
Do not export AUTOENV_ENV_FILENAME, and use existing value

9 years agotravis: fix tests
Daniel Hahler [Thu, 23 Apr 2015 19:52:25 +0000 (21:52 +0200)]
travis: fix tests

 - set SHELL=zsh
 - cd back for ZSH=5
 - fix/improve autoenv.plugin.zsh: no dirname, use ${0:h}

9 years agotravis: use 'sudo make' to fix zsh test
Daniel Hahler [Thu, 23 Apr 2015 18:24:29 +0000 (20:24 +0200)]
travis: use 'sudo make' to fix zsh test

Build: https://travis-ci.org/Tarrasch/zsh-autoenv/jobs/59762278

Error:

   ./A04redirect.ztst: starting.
   *** /tmp/zsh.ztst.err.16143 Thu Apr 23 18:06:09 2015
   --- /tmp/zsh.ztst.terr.16143 Thu Apr 23 18:06:09 2015
   ***************
   *** 1 ****
   ! zsh:1: no such file or directory: /nonexistent/nonexistent
   --- 1 ----
   ! zsh:1: permission denied: /nonexistent/nonexistent
   Test ./A04redirect.ztst failed: error output differs from expected as shown above for:
     $ZTST_testdir/../Src/zsh -fc 'exec >/nonexistent/nonexistent
     echo output'
   Was testing: failed exec redir, no POSIX_BUILTINS

9 years agoFix _autoenv_get_file_mtime for zsh 4 (no pipefail option)
Daniel Hahler [Thu, 23 Apr 2015 17:55:21 +0000 (19:55 +0200)]
Fix _autoenv_get_file_mtime for zsh 4 (no pipefail option)

9 years agomake test_full: use zsh 4 (/opt/zsh4/bin/zsh) and zsh 5
Daniel Hahler [Thu, 23 Apr 2015 17:54:44 +0000 (19:54 +0200)]
make test_full: use zsh 4 (/opt/zsh4/bin/zsh) and zsh 5

9 years agotravis: add zsh 4/5 to matrix
Daniel Hahler [Thu, 23 Apr 2015 17:24:21 +0000 (19:24 +0200)]
travis: add zsh 4/5 to matrix

9 years agotravis: fix env matrix (use a list)
Daniel Hahler [Thu, 23 Apr 2015 15:58:53 +0000 (17:58 +0200)]
travis: fix env matrix (use a list)

9 years agoCleanup tests/varstash_export.t
Daniel Hahler [Thu, 23 Apr 2015 15:57:56 +0000 (17:57 +0200)]
Cleanup tests/varstash_export.t

9 years agovarstash: fix get_autostash_array_name for Zsh 4.3.17 (Travis)
Daniel Hahler [Thu, 23 Apr 2015 15:57:46 +0000 (17:57 +0200)]
varstash: fix get_autostash_array_name for Zsh 4.3.17 (Travis)

9 years agotravis: use env test matrix for ZDOTDIR
Daniel Hahler [Thu, 23 Apr 2015 15:38:01 +0000 (17:38 +0200)]
travis: use env test matrix for ZDOTDIR

9 years agotravis: cleanup, output zsh version
Daniel Hahler [Thu, 23 Apr 2015 15:34:59 +0000 (17:34 +0200)]
travis: cleanup, output zsh version

9 years agotests: rename setup.sh to setup.zsh
Daniel Hahler [Thu, 23 Apr 2015 14:03:21 +0000 (16:03 +0200)]
tests: rename setup.sh to setup.zsh

9 years agotests: define/use $TEST_SOURCE_AUTOENV
Daniel Hahler [Thu, 23 Apr 2015 14:00:12 +0000 (16:00 +0200)]
tests: define/use $TEST_SOURCE_AUTOENV

This handled (re)loading autoenv for
ZDOTDIR=tests/ZDOTDIR.loadviafunction.

9 years agomake test_full: handle error return code from cram
Daniel Hahler [Thu, 23 Apr 2015 13:30:42 +0000 (15:30 +0200)]
make test_full: handle error return code from cram

9 years agovarstash: remove lib functions, use zsh functions
Daniel Hahler [Thu, 23 Apr 2015 13:27:39 +0000 (15:27 +0200)]
varstash: remove lib functions, use zsh functions

9 years agovarstash: add support for exported variables in subshells
Daniel Hahler [Thu, 23 Apr 2015 13:11:40 +0000 (15:11 +0200)]
varstash: add support for exported variables in subshells

9 years agominor: doc
Daniel Hahler [Thu, 23 Apr 2015 13:11:05 +0000 (15:11 +0200)]
minor: doc

9 years agotests: setup.sh: export TEST_AUTOENV_PLUGIN_FILE
Daniel Hahler [Thu, 23 Apr 2015 12:40:26 +0000 (14:40 +0200)]
tests: setup.sh: export TEST_AUTOENV_PLUGIN_FILE

9 years agoFix return value of _autoenv_source; use ': $(( .. ))'
Daniel Hahler [Thu, 23 Apr 2015 12:39:36 +0000 (14:39 +0200)]
Fix return value of _autoenv_source; use ': $(( .. ))'

`(( foo++ ))` returns an error in case $foo is not defined.