Spaceship-prompt: (#q) glob qualifier doesn't work for zsh 5.0.5

Created on 11 Aug 2017  路  5Comments  路  Source: denysdovhan/spaceship-prompt

Issue

It looks like we're using [[ -n *.php(#qN) ]] (with setopt extendedglob) to determine if any php files exist (and using similar methods for other languages).

Unfortunately, this feature wasn't added until after 5.0.5:

This causes weird issues. For example, if you have php installed on your system, you'll always see the php version in the shell prompt, even if there are no .php files. This is because [[ -n *.php(#qN) ]] will always return true.

I don't know if there's a good alternative way to check for files, so you may just want to specify a higher minimum zsh version.

Environment

Operating system: Linux
Terminal emulator: gnome-terminal, tmux v2.5
ZSH version: zsh 5.0.5 (x86_64-pc-linux-gnu)

Relevant .zshrc

I've reproduced this with a minimal zshrc (includes only zplug and spaceship).

bug wontfix

All 5 comments

What version of zsh do you suggest as minimum version ?

I think 5.0.6 has the change.

@salmanulfarzy please, can you check and update the zsh version in the badge and requirements section?

I think it'll be safe to require 5.2, Which so far works good with theme.

Closed since Spaceship now requires at least 5.0.6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oldchevy picture oldchevy  路  3Comments

gabrielpedepera picture gabrielpedepera  路  3Comments

jwhipp picture jwhipp  路  3Comments

janjur picture janjur  路  3Comments

gillesdemey picture gillesdemey  路  3Comments