forked from toolshed/abra
@ -102,15 +102,24 @@ var appRunCommand = &cli.Command{
|
||||
return nil
|
||||
},
|
||||
BashComplete: func(c *cli.Context) {
|
||||
appNames, err := config.GetAppNames()
|
||||
if err != nil {
|
||||
logrus.Warn(err)
|
||||
}
|
||||
if c.NArg() > 0 {
|
||||
return
|
||||
}
|
||||
for _, a := range appNames {
|
||||
fmt.Println(a)
|
||||
switch c.NArg() {
|
||||
case 0:
|
||||
appNames, err := config.GetAppNames()
|
||||
if err != nil {
|
||||
logrus.Warn(err)
|
||||
}
|
||||
for _, a := range appNames {
|
||||
fmt.Println(a)
|
||||
}
|
||||
case 1:
|
||||
appName := c.Args().First()
|
||||
serviceNames, err := config.GetAppServiceNames(appName)
|
||||
if err != nil {
|
||||
logrus.Warn(err)
|
||||
}
|
||||
for _, s := range serviceNames {
|
||||
fmt.Println(s)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user