mirror of
https://github.com/Cheviiot/Vintner.git
synced 2026-08-03 15:57:24 +00:00
Add bash/zsh shell completion
vintner completion bash|zsh prints a completion script meant to be sourced (source <(vintner completion bash)); completes subcommands (including short aliases), download's flags, and directory arguments for install/env --bin. Mentioned in the top-level usage text and documented in the README. The Nivora package doesn't auto-install these system-wide yet - it'd need Stapler's install-completion helper, whose calling convention isn't documented anywhere in this repo or Nivora's other packages, so guessing at it risked a broken package build for a nice-to-have. source <(vintner completion bash) works today regardless of install method (Nivora, prebuilt binary, or from source).
This commit is contained in:
@@ -47,6 +47,8 @@ func runCLI(args []string) int {
|
||||
return runInstall(args[1:])
|
||||
case "env", "e":
|
||||
return runEnv(args[1:])
|
||||
case "completion":
|
||||
return runCompletion(args[1:])
|
||||
case "version", "v", "--version":
|
||||
fmt.Println("vintner " + version)
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user