Added bash completion support.
[src/xds/xds-cli.git] / main.go
diff --git a/main.go b/main.go
index f9b32f3..a6f8104 100644 (file)
--- a/main.go
+++ b/main.go
@@ -141,6 +141,7 @@ func main() {
        app.Metadata["version"] = AppVersion
        app.Metadata["git-tag"] = AppSubVersion
        app.Metadata["logger"] = Log
+       app.EnableBashCompletion = true
 
        // Create env vars help
        dynDesc := "\nENVIRONMENT VARIABLES:"
@@ -208,6 +209,7 @@ func main() {
        initCmdProjects(&app.Commands)
        initCmdSdks(&app.Commands)
        initCmdExec(&app.Commands)
+       initCmdTargets(&app.Commands)
        initCmdMisc(&app.Commands)
 
        // Add --config option to all commands to support --config option either before or after command verb
@@ -312,6 +314,10 @@ func main() {
                XdsConnClose()
        }()
 
+       // Start signals monitoring routine
+       MonitorSignals()
+
+       // Run the cli app
        app.Run(os.Args)
 }