mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-12-22 10:50:16 +02:00
Fix being loaded from a function (antigen)
Fixes https://github.com/Tarrasch/zsh-autoenv/issues/14
This commit is contained in:
parent
1219d83c51
commit
020a9152b7
@ -42,9 +42,10 @@ autoenv_source_parent() {
|
||||
|
||||
# Internal functions. {{{
|
||||
# Internal: stack of entered (and handled) directories. {{{
|
||||
typeset -a _autoenv_stack_entered
|
||||
typeset -g -a _autoenv_stack_entered
|
||||
_autoenv_stack_entered=()
|
||||
typeset -A _autoenv_stack_entered_mtime
|
||||
# -g: make it global, this is required when used with antigen.
|
||||
typeset -g -A _autoenv_stack_entered_mtime
|
||||
_autoenv_stack_entered_mtime=()
|
||||
|
||||
# Add an entry to the stack, and remember its mtime.
|
||||
|
12
tests/ZDOTDIR.loadviafunction/.zshenv
Normal file
12
tests/ZDOTDIR.loadviafunction/.zshenv
Normal file
@ -0,0 +1,12 @@
|
||||
test -f "$TESTDIR/.zcompdump" && rm "$TESTDIR/.zcompdump"
|
||||
|
||||
AUTOENV_DEBUG=0
|
||||
|
||||
antigen-like-loader-function() {
|
||||
source "$TESTDIR/../autoenv.plugin.zsh"
|
||||
}
|
||||
antigen-like-loader-function
|
||||
|
||||
export AUTOENV_ENV_FILENAME="$PWD/.env_auth"
|
||||
|
||||
echo -n > $AUTOENV_ENV_FILENAME
|
Loading…
Reference in New Issue
Block a user