Disable completion (not working well) 85/17385/1 6.99.1 6.99.2 6.99.3 6.99.4 guppy/6.99.1 guppy/6.99.2 guppy/6.99.3 guppy/6.99.4 guppy_6.99.1 guppy_6.99.2 guppy_6.99.3 guppy_6.99.4
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Tue, 23 Oct 2018 08:20:44 +0000 (10:20 +0200)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Tue, 23 Oct 2018 08:20:44 +0000 (10:20 +0200)
Disable completion for now, because it's not working with options
(eg. --label) and prevents to complete local path
IOW current function only completes command and sub-commands that may
be usefull but less important than completing a path.

Change-Id: Ib5fe4f8492367d383bbe92351ec8c69a65b4ea4c
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
conf.d/etc/bash_completion.d/xds-cli
main.go

index b3618a6..bca4251 100644 (file)
@@ -9,4 +9,7 @@ _cli_bash_autocomplete() {
      return 0
  }
 
-complete -F _cli_bash_autocomplete xds-cli
+# FIXME: Disable completion for now, because it's not working with options
+# (eg. --label) and prevents to complete local path
+# (IOW current function only completes command and sub-commands)
+# complete -F _cli_bash_autocomplete xds-cli
diff --git a/main.go b/main.go
index 8d1e0eb..9ac751c 100644 (file)
--- a/main.go
+++ b/main.go
@@ -32,7 +32,6 @@ import (
        "gerrit.automotivelinux.org/gerrit/src/xds/xds-agent.git/lib/xaapiv1"
        common "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git/golib"
        "github.com/Sirupsen/logrus"
-
        "github.com/joho/godotenv"
        "github.com/urfave/cli"
 )
@@ -149,7 +148,10 @@ func main() {
        app.Metadata["version"] = AppVersion
        app.Metadata["git-tag"] = AppSubVersion
        app.Metadata["logger"] = Log
-       app.EnableBashCompletion = true
+       // FIXME: Disable completion for now, because it's not working with options
+       // (eg. --label) and prevents to complete local path
+       // (IOW current function only completes command and sub-commands)
+       app.EnableBashCompletion = false
 
        // Create env vars help
        dynDesc := "\nENVIRONMENT VARIABLES:"