docs: Document setting up command completion for logcli (#7325)

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
pull/7337/head
David Birks 3 years ago committed by GitHub
parent c2ccb25390
commit 5465aaf3e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 14
      docs/sources/tools/logcli.md

@ -55,6 +55,9 @@
##### Changes
#### Logcli
* [7325](https://github.com/grafana/loki/pull/7325) **dbirks**: Document setting up command completion
#### Fluent Bit
#### Loki Canary

@ -33,6 +33,20 @@ Optionally, move the binary into a directory that is part of your `$PATH`.
cp cmd/logcli/logcli /usr/local/bin/logcli
```
## Set up command completion
You can set up tab-completion for `logcli` with one of the two options, depending on your shell:
- For bash, add this to your `~/.bashrc` file:
```
eval "$(logcli --completion-script-bash)"
```
- For zsh, add this to your `~/.zshrc` file:
```
eval "$(logcli --completion-script-zsh)"
```
## LogCLI usage
### Grafana Cloud example

Loading…
Cancel
Save