@@ -15,6 +15,7 @@ func main() {
15
15
app .Name = "flora"
16
16
app .Usage = "Simple app to upgrade your terraform"
17
17
app .Version = "0.1.0"
18
+ app .EnableBashCompletion = true
18
19
app .Commands = []cli.Command {
19
20
{
20
21
Name : "upgrade" ,
@@ -34,9 +35,10 @@ func main() {
34
35
},
35
36
},
36
37
{
37
- Name : "download" ,
38
- Usage : "Download specific Terraform version" ,
39
- ArgsUsage : "TERRAFORM_VERSION" ,
38
+ Name : "download" ,
39
+ Usage : "Download specific Terraform version" ,
40
+ ArgsUsage : "TERRAFORM_VERSION" ,
41
+ BashComplete : flora .VersionsCompletion ,
40
42
Action : func (c * cli.Context ) error {
41
43
if c .NArg () == 0 {
42
44
cli .ShowSubcommandHelp (c )
@@ -60,9 +62,10 @@ func main() {
60
62
},
61
63
},
62
64
{
63
- Name : "use" ,
64
- Usage : "Download(when it's needed) and use specific terraform version" ,
65
- ArgsUsage : "TERRAFORM_VERSION" ,
65
+ Name : "use" ,
66
+ Usage : "Download(when it's needed) and use specific terraform version" ,
67
+ ArgsUsage : "TERRAFORM_VERSION" ,
68
+ BashComplete : flora .VersionsCompletion ,
66
69
Action : func (c * cli.Context ) error {
67
70
version := c .Args ().First ()
68
71
0 commit comments