Skip to content

zsh completion setup fails with 'parse error near elif' #3277

@msaipraneeth

Description

@msaipraneeth

When setting up zsh on the back of git for Windows bash shell, zsh throws a parse error when setting up autocomplete.

Note: using this in a Python venv, but other aspects of the zsh command line are working.

The zsh in use is the msys2 release: https://packages.msys2.org/packages/zsh?repo=msys&variant=x86_64

Minimal Reproduction

https://github.com/msaipraneeth/click-tuple-param

Enable autocompletion:

eval "$(_TUPLE_PARAM_COMPLETE=zsh_source tuple-param)"                                                                                                                                                                   
Error:                                  

  zsh: parse error near `elif'                                                                                                                                                                                             

The command should register zsh completion without errors.

Environment:

  • Python version: 3.11
  • Click version: 8.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions