]> git.maquefel.me Git - brevno-suite/hugo/commit
completion: Improve existing argument completions, add many more
authorVille Skyttä <ville.skytta@iki.fi>
Sun, 7 Apr 2024 20:33:17 +0000 (20:33 +0000)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 11 Apr 2024 13:34:26 +0000 (15:34 +0200)
commita67650b6f764d201fde22b1bc3c06b923fdc5438
tree698bdb49baf78317ad506fcf8642a0f6da883543
parent2a060b37a32c3831ece2203b8b5451adb3c787af
completion: Improve existing argument completions, add many more

Do not offer filenames to arguments not taking one, complete arguments
of options taking resource kinds, directory names, --logLevel, release
--step, config and new --format.

As an internal refactoring, use higher level functions to set flag
completions.  SetAnnotation works, but is more verbose than
alternatives, and uses bash specific wording.

While at it, move setting completions next to flag definitions
consistently.

Remove superfluous --destination completer setting, which is already
set elsewhere.
12 files changed:
commands/commandeer.go
commands/config.go
commands/convert.go
commands/deploy.go
commands/env.go
commands/gen.go
commands/import.go
commands/list.go
commands/mod.go
commands/new.go
commands/release.go
commands/server.go