mirror of
https://github.com/conda-incubator/conda-zsh-completion.git
synced 2026-10-20 04:25:20 +08:00
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:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user