add 'cluster settings set' settings completion (#67)

This commit is contained in:
T. von Dein
2026-07-03 12:52:13 +02:00
parent c9fb572935
commit fb6f2389fe
4 changed files with 925 additions and 0 deletions

View File

@@ -104,6 +104,10 @@ func ClusterSettingsSet(conf *cfg.Config) *cli.Command {
},
},
ShellComplete: func(ctx context.Context, cmd *cli.Command) {
complete(cmd, Cclustersettings)
},
Action: func(ctx context.Context, cmd *cli.Command) error {
args := cmd.Args()

View File

@@ -33,6 +33,7 @@ const (
Capi
Cilm
Cnode
Cclustersettings
)
func complete(cmd *cli.Command, what int) {
@@ -67,6 +68,8 @@ func complete(cmd *cli.Command, what int) {
list, err = es.IlmNames(conf)
case Cnode:
list, err = es.NodeNames(conf)
case Cclustersettings:
list, err = es.ClusterSettingsNames(conf)
}
if err != nil {