Adding bash completion #86

Closed
opened 3 years ago by 6543 · 7 comments
6543 commented 3 years ago
Collaborator
https://github.com/urfave/cli/blob/master/docs/v2/manual.md#bash-completion
6543 added the
kind/proposal
label 3 years ago
6543 added this to the v0.3.0 milestone 3 years ago
6543 modified the milestone from v0.3.0 to v0.4.0 2 years ago
Poster
Collaborator

sudo wget -O /etc/bash_completion.d/tea https://raw.githubusercontent.com/urfave/cli/master/autocomplete/bash_autocomplete && sudo chmod +x /etc/bash_completion.d/tea

`sudo wget -O /etc/bash_completion.d/tea https://raw.githubusercontent.com/urfave/cli/master/autocomplete/bash_autocomplete && sudo chmod +x /etc/bash_completion.d/tea`
Poster
Collaborator

rm it from milestone since I think this has to be done by distro-package-maintainers

but we can leave a note in the docs ...

rm it from milestone since I think this has to be done by distro-package-maintainers but we can leave a note in the docs ...
6543 removed this from the v0.4.0 milestone 2 years ago
6543 added the
kind/docs
label 2 years ago
Owner

We could have a subcommand to detect and setup the bash-completion.

We could have a subcommand to detect and setup the bash-completion.
Poster
Collaborator

In my opinion this overloads tea and package maintainer should keep track of this

In my opinion this overloads tea and package maintainer should keep track of this
Poster
Collaborator

hmm looks like hugo for examle has something similar:

./bin/hugo gen man
./bin/hugo gen autocomplete --completionfile="$builddir"/hugo.bash

by the way urfave/cli has a function to generate man page out of the box too

hmm looks like hugo for examle has something similar: ``` ./bin/hugo gen man ./bin/hugo gen autocomplete --completionfile="$builddir"/hugo.bash ``` by the way urfave/cli has a function to generate man page out of the box too

I think this is our responsibility.

Imagine beeing a package maintainer trying to add autocompletion for three different shells with three different ways to do it of which one is a hack, one requires Go code and the other one must be supported by the application. You probably won't do it.

I think this is our responsibility. Imagine beeing a package maintainer trying to add autocompletion for three different shells with three different ways to do it of which one is a hack, one requires Go code and the other one must be supported by the application. You probably won't do it.
Poster
Collaborator

we either add a "contrib" folder who store manual generated fish/bash completion files or generate things for releases with ci

we either add a "contrib" folder who store manual generated fish/bash completion files or generate things for releases with ci
6543 closed this issue 2 years ago
Sign in to join this conversation.
Loading…
There is no content yet.