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

Support cli autocompletion to logcli #2949

Closed
ibotty opened this issue Nov 18, 2020 · 8 comments · Fixed by #7325
Closed

Support cli autocompletion to logcli #2949

ibotty opened this issue Nov 18, 2020 · 8 comments · Fixed by #7325
Labels
help wanted We would love help on these issues. Please come help us! stale A stale issue or PR that will automatically be closed. type/feature Something new we should do

Comments

@ibotty
Copy link

ibotty commented Nov 18, 2020

Is your feature request related to a problem? Please describe.
I would like to have completion for logcli in bash.

Describe the solution you'd like
I'd appreciate a simple logcli completion bash subcommand that generates bash completion. Similarly maybe for other shells (zsh, fish, etc.).

@cyriltovena cyriltovena added help wanted We would love help on these issues. Please come help us! type/feature Something new we should do labels Nov 18, 2020
@stale
Copy link

stale bot commented Dec 19, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Dec 19, 2020
@ibotty
Copy link
Author

ibotty commented Dec 19, 2020

I'd still like to have autocompletion in bash.

@stale stale bot removed the stale A stale issue or PR that will automatically be closed. label Dec 19, 2020
@stale
Copy link

stale bot commented Jan 18, 2021

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Jan 18, 2021
@ibotty
Copy link
Author

ibotty commented Jan 19, 2021

It's still relevant.

@stale stale bot removed the stale A stale issue or PR that will automatically be closed. label Jan 19, 2021
@stale
Copy link

stale bot commented Feb 21, 2021

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Feb 21, 2021
@stale stale bot closed this as completed Mar 20, 2021
@dbirks
Copy link
Contributor

dbirks commented Oct 3, 2022

I just found that the kingpin package (that logcli uses under the hood for argument parsing) includes some support for completion by default (kingpin docs).

So I added this to my ~/.zshrc:

eval "$(logcli --completion-script-zsh)"

And I get some completions 🙂

image

MichelHollands pushed a commit that referenced this issue Oct 5, 2022
This documents the existing command completion that kingpin provides
(docs
[here](https://github.com/alecthomas/kingpin#bashzsh-shell-completion)
on that).

**Which issue(s) this PR fixes**:
Fixes #2949
lxwzy pushed a commit to lxwzy/loki that referenced this issue Nov 7, 2022
This documents the existing command completion that kingpin provides
(docs
[here](https://github.com/alecthomas/kingpin#bashzsh-shell-completion)
on that).

**Which issue(s) this PR fixes**:
Fixes grafana#2949
changhyuni pushed a commit to changhyuni/loki that referenced this issue Nov 8, 2022
This documents the existing command completion that kingpin provides
(docs
[here](https://github.com/alecthomas/kingpin#bashzsh-shell-completion)
on that).

**Which issue(s) this PR fixes**:
Fixes grafana#2949
Abuelodelanada pushed a commit to canonical/loki that referenced this issue Dec 1, 2022
This documents the existing command completion that kingpin provides
(docs
[here](https://github.com/alecthomas/kingpin#bashzsh-shell-completion)
on that).

**Which issue(s) this PR fixes**:
Fixes grafana#2949
@awsms
Copy link

awsms commented Nov 4, 2023

I just found that the kingpin package (that logcli uses under the hood for argument parsing) includes some support for completion by default (kingpin docs).

So I added this to my ~/.zshrc:

eval "$(logcli --completion-script-zsh)"

And I get some completions 🙂

image

is there anything like this for the fish shell?

@dbirks
Copy link
Contributor

dbirks commented Nov 5, 2023

Hmm no it looks like it's an open issue upstream: alecthomas/kingpin#259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We would love help on these issues. Please come help us! stale A stale issue or PR that will automatically be closed. type/feature Something new we should do
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants