]> Sergey Matveev's repositories - zsh-autoenv.git/commit
Only source varstash lib if it's being used
authorDaniel Hahler <git@thequod.de>
Tue, 26 Apr 2016 18:07:33 +0000 (20:07 +0200)
committerDaniel Hahler <git@thequod.de>
Thu, 28 Apr 2016 18:44:05 +0000 (20:44 +0200)
commitecf2b2961f1051de5b6b3adfec05ef0cb58b8cff
tree476539fc1fff4eb3d6d4a5498d91c884a97dfbb4
parentf021750e899f483c40691c42cf1f3988fa614f47
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.
autoenv.zsh
tests/varstash.t