Merge pull request #46 from hwalinga/old-zsh-cannot-set-initial-value

Set initial value outside of local. Fixes #42
This commit is contained in:
Emergency Self-Construct
2024-02-27 16:24:52 +01:00
committed by GitHub
+3 -1
View File
@@ -159,13 +159,15 @@ local -A opt_args
__conda_envs(){ __conda_envs(){
local -a envs unnamed sort globalfirst localenvs globalenvs local -a envs unnamed sort globalfirst localenvs globalenvs
local -a ls_opts=("-1") local -a ls_opts
local -a describe_opts local -a describe_opts
local localenvspath local localenvspath
# only parse environments.txt (including unnamed envs) if asked by the user # only parse environments.txt (including unnamed envs) if asked by the user
zstyle -s ":conda_zsh_completion:*" show-unnamed unnamed zstyle -s ":conda_zsh_completion:*" show-unnamed unnamed
zstyle -s ":conda_zsh_completion:*" sort-envs-by-time sort zstyle -s ":conda_zsh_completion:*" sort-envs-by-time sort
zstyle -s ":conda_zsh_completion:*" show-global-envs-first globalfirst zstyle -s ":conda_zsh_completion:*" show-global-envs-first globalfirst
ls_opts=("-1")
if test -n "$sort"; then if test -n "$sort"; then
ls_opts+=("-t") ls_opts+=("-t")
describe_opts+=("-V") describe_opts+=("-V")