Skip to content

Instantly share code, notes, and snippets.

@syossan27
Created December 22, 2018 15:27
Show Gist options
  • Save syossan27/02c20d25660123ac6b6c8221b96cae29 to your computer and use it in GitHub Desktop.
Save syossan27/02c20d25660123ac6b6c8221b96cae29 to your computer and use it in GitHub Desktop.
func makeApp() *cli.App {
app := cli.NewApp()
app.EnableBashCompletion = true
app.BashComplete = func(ctx *cli.Context) {
// 接続名を展開して出力
conns := connection.Load()
for _, conn := range conns {
fmt.Println(conn.Name)
}
}
return app
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment