From ecba4e01f110b0b587aa9affcc65729c591321c8 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 13 Nov 2021 22:50:32 +0100 Subject: [PATCH] feat: autocomplete for app cp app names --- cli/app/cp.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cli/app/cp.go b/cli/app/cp.go index 7d2f09fe..16a6f5d2 100644 --- a/cli/app/cp.go +++ b/cli/app/cp.go @@ -139,4 +139,16 @@ And if you want to copy that file back to your current working directory locally } 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) + } + }, }