mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 06:34:18 +02:00
fix-index-show-completion, add more completions (#29)
This commit is contained in:
15
cmd/ccr.go
15
cmd/ccr.go
@@ -44,9 +44,10 @@ func Ccr(conf *cfg.Config) *cli.Command {
|
||||
|
||||
func CcrStatus(conf *cfg.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "status",
|
||||
Aliases: []string{"st"},
|
||||
Usage: "cross cluster replication status (yaml config with 2 clusters required)",
|
||||
Name: "status",
|
||||
Aliases: []string{"st"},
|
||||
Usage: "cross cluster replication status (yaml config with 2 clusters required)",
|
||||
UsageText: "status <leader> <follower>",
|
||||
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
@@ -57,6 +58,10 @@ func CcrStatus(conf *cfg.Config) *cli.Command {
|
||||
},
|
||||
},
|
||||
|
||||
ShellComplete: func(ctx context.Context, cmd *cli.Command) {
|
||||
completeCluster(cmd)
|
||||
},
|
||||
|
||||
Action: func(ctx context.Context, cmd *cli.Command) error {
|
||||
leader := cmd.Args().Get(0)
|
||||
follower := cmd.Args().Get(1)
|
||||
@@ -109,6 +114,10 @@ func CcrRemoteInfo(conf *cfg.Config) *cli.Command {
|
||||
Usage: "show ccr remote info",
|
||||
UsageText: "info [options] [<index>]",
|
||||
|
||||
ShellComplete: func(ctx context.Context, cmd *cli.Command) {
|
||||
completeIndex(cmd)
|
||||
},
|
||||
|
||||
Action: func(ctx context.Context, cmd *cli.Command) error {
|
||||
return es.CcrRemoteInfo(conf, cmd.Args().Get(0))
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user