Skip to content

Commit

Permalink
command: add autocomplete for init -short flag
Browse files Browse the repository at this point in the history
  • Loading branch information
nickethier committed May 11, 2018
1 parent 17abb1b commit 32ec72d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions command/job_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"io/ioutil"
"os"
"strings"

"github.com/posener/complete"
)

const (
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 32ec72d

Please sign in to comment.