From 32ec72d97dcfcff6f5cc46f0167d8411b34d1d0c Mon Sep 17 00:00:00 2001 From: Nick Ethier Date: Thu, 10 May 2018 23:19:08 -0400 Subject: [PATCH] command: add autocomplete for init -short flag --- command/job_init.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/command/job_init.go b/command/job_init.go index 29b991567..69ded3aa3 100644 --- a/command/job_init.go +++ b/command/job_init.go @@ -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 {