mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-11-22 23:40:58 +02:00
Optimize _autoenv_stack_entered_contains (#88)
Only make `$env_file` absolute once.
This commit is contained in:
parent
12ed110764
commit
0bb85014e6
@ -117,8 +117,9 @@ _autoenv_stack_entered_contains() {
|
|||||||
# Entry is in stack.
|
# Entry is in stack.
|
||||||
f=$env_file
|
f=$env_file
|
||||||
else
|
else
|
||||||
|
local env_file_abs=${env_file:A}
|
||||||
for i in $_autoenv_stack_entered; do
|
for i in $_autoenv_stack_entered; do
|
||||||
if [[ ${i:A} == ${env_file:A} ]]; then
|
if [[ ${i:A} == ${env_file_abs} ]]; then
|
||||||
# Entry is in stack (compared with resolved symlinks).
|
# Entry is in stack (compared with resolved symlinks).
|
||||||
f=$i
|
f=$i
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user