Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
askurihin opened this issue Jun 11, 2020 · 7 comments
Open

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

askurihin opened this issue Jun 11, 2020 · 7 comments

Comments

@askurihin
Copy link

Description

After resent update (ff91c8d), 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 ff91c8d
  3. open a new zsh session (type zsh)

Versions

  • Prezto commit:
    ff91c8d
  • ZSH version:
    zsh 5.0.2 (x86_64-redhat-linux-gnu)
  • OS information:
    Centos 7.4
@srijanshetty
Copy link
Collaborator

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.

@belak
Copy link
Collaborator

belak commented Jun 11, 2020

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.

@srijanshetty
Copy link
Collaborator

@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.

@okin
Copy link

okin commented Aug 11, 2020

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

@srijanshetty
Copy link
Collaborator

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

@jahagirdar
Copy link

Was this resolved?
I am forced to use centos7 on some machines for tool compability issues. and am seeing this issue.

@belak
Copy link
Collaborator

belak commented Dec 6, 2022

I don't believe so. It's not a big priority for me and I don't have any centos boxes to test on, but if you have a patch which works, you're welcome to submit it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants