Spaceship-prompt: bad pattern error on current master

Created on 19 Jan 2018  ยท  11Comments  ยท  Source: denysdovhan/spaceship-prompt

Issue

I got update by antigen update but the problem is Spaceship starts to give error below. It appears on every command and shell start.

Installing denysdovhan/spaceship-zsh-theme!...
spaceship::union:1: bad pattern: sections=(time

'time' not found'user' not found'dir' not found'host' not found'git' not found'hg' not found'package' not found'node' not found'ruby' not found'elixir' not found'xcode' not found'swift' not found'golang' not found'php' not found'rust' not found'haskell' not found'julia' not found'docker' not found'aws' not found'venv' not found'conda' not found'pyenv' not found'dotnet' not found'ember' not found'kubecontext' not found'exec_time' not found'line_sep' not found'battery' not found'vi_mode' not found'jobs' not found'exit_code' not found'char' not found

I removed the cache and folder in .antigen/bundles/ then I reinstalled again but It still doesn't work.

Screenshot

screenshot

Environment

Spaceship version: 3.0.2 (use echo $SPACESHIP_VERSION)
Zsh version: zsh 5.0.8 (x86_64-apple-darwin15.0)
Zsh framework: none
Zsh plugin manager: antigen
Terminal emulator: Hyper
Operating system: macOS

Relevant .zshrc

export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=10

source $(brew --prefix)/share/antigen/antigen.zsh

antigen use oh-my-zsh

antigen bundle git
antigen bundle rsync
antigen bundle heroku
antigen bundle history
antigen bundle osx
antigen bundle node
antigen bundle aws
antigen bundle github
antigen bundle command-not-found
antigen bundle gusaiani/elixir-oh-my-zsh
antigen bundle dijitalmunky/nvm-auto
antigen bundle zsh-users/fizsh
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-history-substring-search
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions

antigen theme https://github.com/denysdovhan/spaceship-zsh-theme spaceship

SPACESHIP_TIME_SHOW=true
SPACESHIP_EXEC_TIME_SHOW=false
SPACESHIP_KUBECONTEXT_SHOW=false

antigen apply
bug wontfix

Most helpful comment

Oh my god, this problem confuse me for a whole day.
Just because the zsh version...

Solve it (updated 5/20/2020):

$ wget https://sourceforge.net/projects/zsh/files/zsh/5.8/zsh-5.8.tar.xz/download

$ tar -xvJf download
$ cd zsh-5.8/

$ ./configure
$ make && sudo make install

$ rm -rf download zsh-5.8

All 11 comments

Can confirm this due to zsh 5.0.8, Will update with more info. Meanwhile, Please try theme with a latest version of zsh.

Hey @salmanulfarzy, I tried with latest version and It works!

$SHELL --version
zsh 5.4.2 (x86_64-apple-darwin15.6.0)

Sounds great. Will find compatible zsh version and update README

Zsh added several reserved words for builtins with 5.1.

The builtins declare, export, local, readonly and typeset now have corresponding reserved words. When used in this form, the builtin syntax is extended so that assignments following the reserved word are treated similarly to assignments that appear at the start of the command line.
For example,
local scalar=echo one word array=(several words) creates a local "scalar" containing the text "one word" and an array "array" containing the words "several" "words".

This might be the possible cause.

Reopening until a decision is made on #332.

Oh my god, this problem confuse me for a whole day.
Just because the zsh version...

Solve it (updated 5/20/2020):

$ wget https://sourceforge.net/projects/zsh/files/zsh/5.8/zsh-5.8.tar.xz/download

$ tar -xvJf download
$ cd zsh-5.8/

$ ./configure
$ make && sudo make install

$ rm -rf download zsh-5.8

still not working on zsh 5.3.1

@falconchen Do you've the same error or different one ? If different please open new issue with more information.

Should work on >=5.2.

Bumped into this issue on CentOS 7, and have just one tiny comment to add on @AurevoirXavier's procedure: When compiling from source, your brand new zsh goes to /usr/local/bin/zsh, not /bin/zsh.

Also, make sure you chsh your shell to that one instead of manually editing your /etc/passwd. In my case, I had SELinux enabled, so I had to boot into rescue mode to revert back to /bin/bash and get back access to my laptop.

I'm having this same issue, but the problem is that i dont know how to downgrade my zsh version on Mac Os X Terminal

โฏ zsh --version
zsh 5.8 (x86_64-apple-darwin15.6.0)

error:
'user' not found'dir' not found'host' not found'git' not found'hg' not found'exec_time' not found'line_sep' not found'vi_mode' not found'jobs' not found'exit_code' not found'char' not found

Can anyone help me?

Was this page helpful?
5 / 5 - 1 ratings

Related issues

AlecRust picture AlecRust  ยท  3Comments

nfischer picture nfischer  ยท  3Comments

maccius picture maccius  ยท  3Comments

olets picture olets  ยท  3Comments

tbekaert picture tbekaert  ยท  3Comments