geometry-zsh / geometry

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

geometry_plugin_setup:2: bad pattern: _ctx_plugins=(path #189

Closed boldhaus closed 6 years ago

boldhaus commented 6 years ago

Hi,

when using the newest version of geometry with support for left-prompt customization in the following environment

# cat /etc/os-release
NAME="openSUSE Leap"
VERSION="42.3"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="42.3"
PRETTY_NAME="openSUSE Leap 42.3"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:42.3"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
# uname -r
4.4.92-31-default
# zplug --version
2.4.1
# zsh --version
zsh 5.0.5 (x86_64-suse-linux-gnu)

and this .zshrc

...
if [[ ! -d ~/.zplug ]]; then
  git clone https://github.com/zplug/zplug ~/.zplug
  source ~/.zplug/init.zsh && zplug update --self
else
  source ~/.zplug/init.zsh
fi

zplug "zplug/zplug"
zplug "geometry-zsh/geometry"

zplug load
...

I get this error when opening a shell

[zplug] These repos have failed to load:
- geometry-zsh/geometry

When I call zplug load --verbose this is the output

...
WARNING:  Failed to load "~/.zplug/repos/geometry-zsh/geometry/geometry.plugin.zsh" (geometry-zsh/geometry)
...

Calling geometry_plugin_setup shows

geometry_plugin_setup:2: bad pattern: _ctx_plugins=(path

Calling geometry_plugin_list shows

primary:

secondary:

Thank you for looking into this issue.

desyncr commented 6 years ago

Yep, it's an issue with zsh 5.0.x. I'll take a look later tonight (IIRC it needs typeset -a or to move local outside the for loop).

desyncr commented 6 years ago

Should be fixed now on master.