Skip to content

Commit

Permalink
docs: Document setting up command completion for logcli (grafana#7325)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dbirks authored and changhyuni committed Nov 8, 2022
1 parent 3253453 commit a3e7ae3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@

##### Changes

#### Logcli
* [7325](https://github.com/grafana/loki/pull/7325) **dbirks**: Document setting up command completion

#### Fluent Bit

#### Loki Canary
Expand Down
14 changes: 14 additions & 0 deletions docs/sources/tools/logcli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3e7ae3

Please sign in to comment.