backport of commit 0748918a3a355ad5616e32c1aad041321a771418 (#18919)
Co-authored-by: Dave May <dmay@hashicorp.com>
This commit is contained in:
parent
1a0fb2f4fa
commit
74e03514fc
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
cli: Add file prediction for operator raft/snapshot commands
|
||||
```
|
|
@ -36,7 +36,7 @@ func (c *OperatorRaftInfoCommand) AutocompleteFlags() complete.Flags {
|
|||
}
|
||||
|
||||
func (c *OperatorRaftInfoCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
return complete.PredictFiles("*")
|
||||
}
|
||||
|
||||
func (c *OperatorRaftInfoCommand) Synopsis() string {
|
||||
|
|
|
@ -45,7 +45,7 @@ func (c *OperatorRaftLogsCommand) AutocompleteFlags() complete.Flags {
|
|||
}
|
||||
|
||||
func (c *OperatorRaftLogsCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
return complete.PredictFiles("*")
|
||||
}
|
||||
|
||||
func (c *OperatorRaftLogsCommand) Synopsis() string {
|
||||
|
|
|
@ -42,11 +42,13 @@ Options:
|
|||
}
|
||||
|
||||
func (c *OperatorRaftStateCommand) AutocompleteFlags() complete.Flags {
|
||||
return complete.Flags{}
|
||||
return complete.Flags{
|
||||
"-last-index": complete.PredictNothing,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *OperatorRaftStateCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
return complete.PredictFiles("*")
|
||||
}
|
||||
|
||||
func (c *OperatorRaftStateCommand) Synopsis() string {
|
||||
|
|
|
@ -33,7 +33,7 @@ func (c *OperatorSnapshotInspectCommand) AutocompleteFlags() complete.Flags {
|
|||
}
|
||||
|
||||
func (c *OperatorSnapshotInspectCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
return complete.PredictFiles("*.snap")
|
||||
}
|
||||
|
||||
func (c *OperatorSnapshotInspectCommand) Synopsis() string {
|
||||
|
|
|
@ -46,7 +46,7 @@ func (c *OperatorSnapshotRestoreCommand) AutocompleteFlags() complete.Flags {
|
|||
}
|
||||
|
||||
func (c *OperatorSnapshotRestoreCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
return complete.PredictFiles("*.snap")
|
||||
}
|
||||
|
||||
func (c *OperatorSnapshotRestoreCommand) Synopsis() string {
|
||||
|
|
|
@ -43,7 +43,7 @@ func (c *OperatorSnapshotStateCommand) AutocompleteFlags() complete.Flags {
|
|||
}
|
||||
|
||||
func (c *OperatorSnapshotStateCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
return complete.PredictFiles("*.snap")
|
||||
}
|
||||
|
||||
func (c *OperatorSnapshotStateCommand) Synopsis() string {
|
||||
|
|
Loading…
Reference in New Issue