geometry-zsh / geometry

geometry is a minimal, fully customizable and composable zsh prompt theme
ISC License
921 stars 94 forks source link

Error configuring plugins: bad set of key/value pairs for associative array #221

Closed lox closed 5 years ago

lox commented 5 years ago

Apologies if this is a zsh issue, or something with my configuration, but I'm not able to set the plugin configuration as documented:

 ▲ ~ export GEOMETRY_PROMPT_PLUGINS=(terraform exec_time jobs node virtualenv kube git)
zsh: bad set of key/value pairs for associative array

 ✗ ~ zsh --version
zsh 5.5.1 (x86_64-apple-darwin17.5.0)

Any ideas? I assume the error is because $GEOMETRY_PROMPT_PLUGINS is already defined as an associative array somewhere?

jedahan commented 5 years ago

I think we only support setting loaded plugin list before sourcing zsh.

If you need to load interactively you might need typeset -a or typeset -gA first, or look at PROMPT_GEOMETRY_PLUGINS_PRIMARY which is an indexed array.

Sorry I can be of more help for a while

WhiteAbeLincoln commented 5 years ago

I'm getting the same issue when setting GEOMETRY_PROMPT_PLUGINS in my zshrc file

jedahan commented 5 years ago

@WhiteAbeLincoln can you share your zshrc? As long as the variable is exported before sourcing geometry.zsh I'd hope that it works.

WhiteAbeLincoln commented 5 years ago

It looks like that was the issue. I had exported the variables only after geometry was sourced, and hadn’t noticed before because the default behavior was what I needed until now.

On Aug 28, 2018, at 13:57, Jonathan Dahan notifications@github.com wrote:

@WhiteAbeLincoln can you share your zshrc? As long as the variable is exported before sourcing geometry.zsh I'd hope that it works.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.