Skip to content

zsh autocomplete error when calling eksctl create nodegroup - invalid option definition #2747

@ysam12345

Description

@ysam12345

What happened?
When I type eksctl create nodegroup [TAB]
It shows following error
_arguments:comparguments:319: invalid option definition: --version[Kubernetes version (valid options: 1.14, 1.15, 1.16, 1.17) [for nodegroups "auto" and "latest" can be used to automatically inherit version from the control plane or force latest]]:

Tested on my two macbook pro / Amazon Linux 2 EC2 Instance and saw the same error.

What you expected to happen?
Showing the autocomplete choices without any error.

How to reproduce it?

  1. follow the guide to install eksctl autocompletion
    https://eksctl.io/introduction/#zsh
  2. using zsh and type
    eksctl create nodegroup [TAB]

Anything else we need to know?
I think it's similar to this issue:
clap-rs/clap#771
I can manually add escape character to ~/.zsh/completion/_eksctl line334
圖片
After that, it works fine
圖片

Versions

$ eksctl version
0.29.2
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"17+", GitVersion:"v1.17.9-eks-4c6976", GitCommit:"4c6976793196d70bc5cd29d56ce5440c9473648e", GitTreeState:"clean", BuildDate:"2020-07-17T19:00:19Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17+", GitVersion:"v1.17.9-eks-4c6976", GitCommit:"4c6976793196d70bc5cd29d56ce5440c9473648e", GitTreeState:"clean", BuildDate:"2020-07-17T18:46:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

Logs
圖片

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions