Skip to content

Add support for Zsh completion to beats subcommand#5761

Merged
ruflin merged 6 commits into
elastic:masterfrom
ph:feature/support-zsh-completions
Nov 30, 2017
Merged

Add support for Zsh completion to beats subcommand#5761
ruflin merged 6 commits into
elastic:masterfrom
ph:feature/support-zsh-completions

Conversation

@ph
Copy link
Copy Markdown
Contributor

@ph ph commented Nov 29, 2017

Update the cobra library and enable zsh support for completion, you can generate the completion using the following command:

./filebeat completion zsh > _filebeat

Make sure the file is in your $fpath, you can find your currently configured path with echo $fpath and add another one with fpath = ($fpath /my/newpath) in your .zshrc

Note to reviewer I can split the update of the library with the Zsh if preferred.

@ph ph added the review label Nov 29, 2017
@kvch
Copy link
Copy Markdown
Contributor

kvch commented Nov 29, 2017

Just curious: is the command has to be run by the user even if the Beat is installed from a package?

@ph
Copy link
Copy Markdown
Contributor Author

ph commented Nov 29, 2017 via email

Copy link
Copy Markdown
Contributor

@exekias exekias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is great! 🎉 related to #5617

Comment thread CHANGELOG.asciidoc Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something went wrong here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh bad rebase on multiples commits.

@ph
Copy link
Copy Markdown
Contributor Author

ph commented Nov 29, 2017

Just to keep it in mind, the cobra generator for zsh is minimal and wont handle flags for now.
see spf13/cobra#497

@ruflin ruflin merged commit 94aaed2 into elastic:master Nov 30, 2017
@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Nov 30, 2017

@ph @exekias We should also have that in our docs somewhere I think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants