Skip to content

Commit

Permalink
fix(CLI): add tool name to Retina CLI help message (#891)
Browse files Browse the repository at this point in the history
# Description
This PR fixes a bug where the tool name is missing in the help message
of Retina CLI.
As a side effect, the `kubectl-retina completion` command will now
generate a completion script that works correctly.

## Related Issue

If this pull request is related to any issue, please mention it here.
Additionally, make sure that the issue is assigned to you before
submitting this pull request.
#973 

## Checklist

- [X] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [X] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [X] I have correctly attributed the author(s) of the code.
- [X] I have tested the changes locally.
- [X] I have followed the project's style guidelines.
- [ ] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

before:
```
$ kubectl-retina
Usage:
   [command]
```
after:
```
$ kubectl-retina
A kubectl plugin for Retina
Retina is an eBPF distributed networking observability tool for Kubernetes.

Usage:
  kubectl-retina [command]
```
---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.

---------

Signed-off-by: k-nzw <[email protected]>
  • Loading branch information
k-nzw authored Nov 14, 2024
1 parent d6baa48 commit 982236d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ type Config struct {
}

var Retina = &cobra.Command{
Use: "kubectl-retina",
Short: "A kubectl plugin for Retina",
Long: "A kubectl plugin for Retina\nRetina is an eBPF distributed networking observability tool for Kubernetes.",
PersistentPreRun: func(*cobra.Command, []string) {
var config Config
file, _ := os.ReadFile(ClientConfigPath)
Expand Down

0 comments on commit 982236d

Please sign in to comment.