elastic / ecctl

Apache License 2.0
57 stars 53 forks source link

Deployment instructions on www.elastic.co/downloads/ecctl don't support default macOS shell (zsh) #317

Open tonymeehan opened 4 years ago

tonymeehan commented 4 years ago

Readiness Checklist

Current/Expected Behavior

Screen Shot 2020-06-18 at 3 35 00 PM

I followed these steps from www.elastic.co/downloads/ecctl today on macOS on 10.15.5 and run into this problem:

tony@tony-mbp ~ % source <(ecctl generate completions)
complete:13: command not found: compdef
tony@tony-mbp ~ % bash
bash-3.2$ source <(ecctl generate completions)
bash-3.2$ echo $?
0

The issue is zsh is now the default shell on macOS. This works fine on bash.

marclop commented 4 years ago

That's interesting, @tonymeehan I've got zsh and it works fine for me:

$ source <(ecctl generate completions)
$ echo $SHELL
/bin/zsh
$ ecctl version
Version:               v1.0.0-beta3
Client API Version:    2.5.0-ms36
Go version:            go1.13.10
Git commit:            4d5ca4e0
Built:                 Tue 12 May 00:30:44 2020
OS/Arch:               darwin / amd64
tonymeehan commented 4 years ago

Hrm.

tony@tony-mbp Desktop % source <(ecctl generate completions)
complete:13: command not found: compdef
tony@tony-mbp Desktop % echo $SHELL
/bin/zsh
tony@tony-mbp Desktop % ecctl version
Version:               v1.0.0-beta3
Client API Version:    2.5.0-ms36
Go version:            go1.13.10
Git commit:            4d5ca4e0
Built:                 Tue 12 May 00:30:44 2020
OS/Arch:               darwin / amd64

It looks like this is the problem: https://apple.stackexchange.com/a/340718

I just followed those instructions, and now it's working for me on zsh:

tony@tony-mbp Desktop % autoload -Uz compinit
tony@tony-mbp Desktop % compinit
tony@tony-mbp Desktop % source <(ecctl generate completions)
tony@tony-mbp Desktop % 
marclop commented 4 years ago

Ah good to know, I'll tag this issue as "Documentation" and see how we can address this.

alaudazzi commented 2 years ago

This issue hasn’t been updated in 2 years and doesn’t have an owner. If there are no replies in 2 weeks, we will close this issue.