mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-11-25 16:31:00 +02:00
minor: doc; improve autostash check
This commit is contained in:
parent
32598b5850
commit
b0d5ff456f
@ -60,7 +60,7 @@ autoenv_source_parent() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Internal functions. {{{
|
# Internal functions. {{{
|
||||||
# Internal: stack of entered (and handled) directories. {{{
|
# Internal: stack of loaded env files (i.e. entered directories). {{{
|
||||||
typeset -g -a _autoenv_stack_entered
|
typeset -g -a _autoenv_stack_entered
|
||||||
# -g: make it global, this is required when used with antigen.
|
# -g: make it global, this is required when used with antigen.
|
||||||
typeset -g -A _autoenv_stack_entered_mtime
|
typeset -g -A _autoenv_stack_entered_mtime
|
||||||
@ -292,7 +292,7 @@ _autoenv_source() {
|
|||||||
# Source varstash library once.
|
# Source varstash library once.
|
||||||
# XXX: pollutes environment with e.g. `stash`, and `autostash` will cause
|
# XXX: pollutes environment with e.g. `stash`, and `autostash` will cause
|
||||||
# an overwritten `stash` function to be called!
|
# an overwritten `stash` function to be called!
|
||||||
if [[ -z "$functions[(I)autostash]" ]]; then
|
if ! (( $+functions[autostash] )); then
|
||||||
if \grep -qE '\b(autostash|autounstash|stash)\b' $autoenv_env_file; then
|
if \grep -qE '\b(autostash|autounstash|stash)\b' $autoenv_env_file; then
|
||||||
source ${${funcsourcetrace[1]%:*}:h}/lib/varstash
|
source ${${funcsourcetrace[1]%:*}:h}/lib/varstash
|
||||||
fi
|
fi
|
||||||
@ -410,7 +410,7 @@ _autoenv_chpwd_handler() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Unstash any autostashed stuff.
|
# Unstash any autostashed stuff.
|
||||||
if [[ -n "$functions[(I)autostash]" ]]; then
|
if (( $+functions[autostash] )); then
|
||||||
varstash_dir=$prev_dir autounstash
|
varstash_dir=$prev_dir autounstash
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user