Add autocomplete where missing
This commit is contained in:
parent
687c26093c
commit
f0a5018a91
|
@ -4,6 +4,8 @@ import (
|
|||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
type AgentInfoCommand struct {
|
||||
|
@ -26,6 +28,14 @@ func (c *AgentInfoCommand) Synopsis() string {
|
|||
return "Display status information about the local agent"
|
||||
}
|
||||
|
||||
func (c *AgentInfoCommand) AutocompleteFlags() complete.Flags {
|
||||
return c.Meta.AutocompleteFlags(FlagSetClient)
|
||||
}
|
||||
|
||||
func (c *AgentInfoCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
}
|
||||
|
||||
func (c *AgentInfoCommand) Name() string { return "agent-info" }
|
||||
|
||||
func (c *AgentInfoCommand) Run(args []string) int {
|
||||
|
|
|
@ -54,7 +54,7 @@ func (c *JobHistoryCommand) Synopsis() string {
|
|||
return "Display all tracked versions of a job"
|
||||
}
|
||||
|
||||
func (c *JobHistoryCommand) Autocompleteflags() complete.Flags {
|
||||
func (c *JobHistoryCommand) AutocompleteFlags() complete.Flags {
|
||||
return mergeAutocompleteFlags(c.Meta.AutocompleteFlags(FlagSetClient),
|
||||
complete.Flags{
|
||||
"-p": complete.PredictNothing,
|
||||
|
|
|
@ -48,6 +48,10 @@ func (c *JobInitCommand) AutocompleteFlags() complete.Flags {
|
|||
})
|
||||
}
|
||||
|
||||
func (c *JobInitCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
}
|
||||
|
||||
func (c *JobInitCommand) Name() string { return "job init" }
|
||||
|
||||
func (c *JobInitCommand) Run(args []string) int {
|
||||
|
|
|
@ -3,6 +3,8 @@ package command
|
|||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
type ServerForceLeaveCommand struct {
|
||||
|
@ -28,6 +30,14 @@ func (c *ServerForceLeaveCommand) Synopsis() string {
|
|||
return "Force a server into the 'left' state"
|
||||
}
|
||||
|
||||
func (c *ServerForceLeaveCommand) AutocompleteFlags() complete.Flags {
|
||||
return c.Meta.AutocompleteFlags(FlagSetClient)
|
||||
}
|
||||
|
||||
func (c *ServerForceLeaveCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
}
|
||||
|
||||
func (c *ServerForceLeaveCommand) Name() string { return "server force-leave" }
|
||||
|
||||
func (c *ServerForceLeaveCommand) Run(args []string) int {
|
||||
|
|
|
@ -3,6 +3,8 @@ package command
|
|||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
type ServerJoinCommand struct {
|
||||
|
@ -29,6 +31,14 @@ func (c *ServerJoinCommand) Synopsis() string {
|
|||
return "Join server nodes together"
|
||||
}
|
||||
|
||||
func (c *ServerJoinCommand) AutocompleteFlags() complete.Flags {
|
||||
return c.Meta.AutocompleteFlags(FlagSetClient)
|
||||
}
|
||||
|
||||
func (c *ServerJoinCommand) AutocompleteArgs() complete.Predictor {
|
||||
return complete.PredictNothing
|
||||
}
|
||||
|
||||
func (c *ServerJoinCommand) Name() string { return "server join" }
|
||||
|
||||
func (c *ServerJoinCommand) Run(args []string) int {
|
||||
|
|
Loading…
Reference in New Issue