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

Bash autocompletion for ddev, fixes #125 #309

Merged
merged 6 commits into from Jun 13, 2017

Conversation

rfay
Copy link
Member

@rfay rfay commented Jun 12, 2017

The Problem:

Some of us are dependent on autocompletion. OP #125

The Fix:

Cobra supports bash completion, although it does not yet support (directly) zsh completion. The implementation is fairly straightforward into a separate binary.

The Test:

  • build for your platform
  • The completions generator will be in bin/.../ddev_gen_autocomplete, for example bin/darwin/darwin_amd64/ddev_gen_autocomplete
  • run the generator, bin/darwin/darwin_amd64/ddev_gen_autocomplete and it will create bin/ddev_bash_completion.sh
  • ddev_bash_completion.sh can be installed as ddev in /usr/local/etc/bash_completion.d/ddev or wherever you keep your bash completions.

Automation Overview:

Related Issue Link(s):

Release/Deployment notes:

After a new release (v0.8) is created, the homebrew recipe should support automatically installing the completions.

@rfay rfay self-assigned this Jun 12, 2017
@rfay rfay requested a review from tannerjfco June 12, 2017 21:34
@rfay rfay added this to the v0.8 milestone Jun 13, 2017
Copy link
Contributor

@tannerjfco tannerjfco left a comment

Choose a reason for hiding this comment

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

The bash completion seems to work great, docs look good for it too. Really nice to have the auto-install for homebrew! Maybe we should add it as an installation method for Mac users in the docs.

@rfay
Copy link
Member Author

rfay commented Jun 13, 2017

Shucks, just realized we didn't get this into v0.7, it would have been fun to make homebrew work with it.

I think homebrew will probably make its way into the docs. It was kind of a back-door project and it hasn't actually been decided to support it yet.

Thanks for playing!

@rfay rfay merged commit 67268ed into ddev:master Jun 13, 2017
@rfay rfay deleted the 20170612_autocompletion branch June 13, 2017 21:01
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

Successfully merging this pull request may close these issues.

None yet

2 participants