feat: add cli option to generate shell auto completion

The urfave/cli/v2 has built-in auto-completion support for bash.
This enables generating the auto completions with a cli option
that can be added to environment setup scripts.

Also adding some distro support scripts for rpm and deb for the
auto completion setup.

To enable auto completion in zsh, this still needs to be added
to user .zshrc:
fpath=(/usr/share/zsh/site-functions $fpath)
autoload -Uz compinit && compinit

Fixes #2015
This commit is contained in:
Ben McClelland
2026-04-13 19:17:56 -07:00
parent efd1885d21
commit 14b0aabb0b
5 changed files with 60 additions and 1 deletions
+2 -1
View File
@@ -146,7 +146,8 @@ func main() {
func initApp() *cli.App {
return &cli.App{
Usage: "Versity S3 Gateway",
EnableBashCompletion: true,
Usage: "Versity S3 Gateway",
Description: `The Versity S3 Gateway is an S3 protocol translator that allows an S3 client
to access the supported backend storage as if it was a native S3 service.
VersityGW is an open-source project licensed under the Apache 2.0 License. The