mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
command: add autocomplete for init -short flag
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -39,6 +41,13 @@ func (c *JobInitCommand) Synopsis() string {
|
||||
return "Create an example job file"
|
||||
}
|
||||
|
||||
func (c *JobInitCommand) AutocompleteFlags() complete.Flags {
|
||||
return mergeAutocompleteFlags(c.Meta.AutocompleteFlags(FlagSetClient),
|
||||
complete.Flags{
|
||||
"-short": complete.PredictNothing,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *JobInitCommand) Name() string { return "job init" }
|
||||
|
||||
func (c *JobInitCommand) Run(args []string) int {
|
||||
|
||||
Reference in New Issue
Block a user