Prezto: ~/.zprezto/modules/completion/init.zsh:37: parse error near `]]'

Created on 11 Jun 2020  路  5Comments  路  Source: sorin-ionescu/prezto

Description

After resent update (ff91c8d4), when I open a new shell, I recieve this error:

~/.zprezto/modules/completion/init.zsh:37: parse error near `]]'

Expected behavior

I expect no errors during shell init.

Steps to Reproduce

  1. open zsh version 5.02
  2. update prezto to ff91c8d4
  3. open a new zsh session (type zsh)

Versions

  • Prezto commit:
    ff91c8d410df3e6141248474389051c7ddcaf80a
  • ZSH version:
    zsh 5.0.2 (x86_64-redhat-linux-gnu)
  • OS information:
    Centos 7.4

Most helpful comment

@belak, thanks for commenting. Probably we need consensus on official supported versions, or would that be a long drawn process?

The fix to remove q would be minor, did noodle some code locally and can push that if need be.

All 5 comments

if [[ $_comp_path(#qNmh-20) ]]; uses #q which is supported only after version 5.06 as indicated in the changelog.

If the option EXTENDED_GLOB is in effect, it is possible to force globbing within conditional code using the [[ ... ]] syntax by flagging that a certain string is a glob using the (#q) glob qualifier syntax. The resulting glob is treated as a single argument. For example, [[ -n *.c(#qN) ]] tests whether there are any .c files in the current directory.

I don't know if we have an "officially supported versions" of zsh policy in this project... I usually use Debian's oldstable as a benchmark (which is at 5.3.1). CentOS 7 (which is supported until some time in 2024 is on 5.0.2). CentOS 8 has 5.5.2.

Honestly, I don't like supporting CentOS because the package versions are so old. 5.0.2 came out at the end of 2012, almost 8 years ago. If we were to support this until CentOS 7 End of Life, this means supporting a version of ZSH that's 12 years old.

However, if this is the only thing preventing usage on 5.0.2, we could drop the q flag. There are other ways to write this code.

@belak, thanks for commenting. Probably we need consensus on official supported versions, or would that be a long drawn process?

The fix to remove q would be minor, did noodle some code locally and can push that if need be.

@srijanshetty Would you mind sharing the patch that makes it work?

Taking a step back, the regeneration logic of 20 hours isn't working for me. The last time the cache was created for me was on Jul 23.

Screenshot from 2020-08-12 15-44-05

Was this page helpful?
0 / 5 - 0 ratings