You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2017/03/06 21:44:33 UTC

[33/41] incubator-mynewt-newt git commit: Add back "newt complete" and remove from help text. 1) Added "newt complete" support back. 2) Make the command hidden so it is not in the list of "Available Commands" in newt help. 3) Removed "newt complete" help

Add back "newt complete" and remove from help text.
1) Added "newt complete" support back.
2) Make the command hidden so it is not in the list of "Available Commands" in newt help.
3) Removed "newt complete" help text.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/31e23b2c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/31e23b2c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/31e23b2c

Branch: refs/heads/mynewt_1_0_0
Commit: 31e23b2cf1029aafa0060f36ee9f3d6167fd87ce
Parents: a155308
Author: cwanda <wa...@happycity.com>
Authored: Thu Mar 2 20:25:57 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Mar 6 13:38:18 2017 -0800

----------------------------------------------------------------------
 newt/cli/complete_cmd.go | 14 +++++---------
 newt/newt.go             |  1 +
 2 files changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/31e23b2c/newt/cli/complete_cmd.go
----------------------------------------------------------------------
diff --git a/newt/cli/complete_cmd.go b/newt/cli/complete_cmd.go
index 272f928..ae3d39e 100644
--- a/newt/cli/complete_cmd.go
+++ b/newt/cli/complete_cmd.go
@@ -237,17 +237,13 @@ func completeRunCmd(cmd *cobra.Command, args []string) {
 }
 
 func AddCompleteCommands(cmd *cobra.Command) {
-	completeShortHelp := "Performs Bash Autocompletion (-C)"
-
-	completeLongHelp := completeShortHelp + ".\n\n" +
-		" this command reads environment variables COMP_LINE and COMP_POINT " +
-		" and will send completion options out stdout as one option per line  "
 
 	completeCmd := &cobra.Command{
-		Use:   "complete",
-		Short: completeShortHelp,
-		Long:  completeLongHelp,
-		Run:   completeRunCmd,
+		Use:    "complete",
+		Short:  "",
+		Long:   "",
+		Run:    completeRunCmd,
+		Hidden: true,
 	}
 
 	/* silence errors on the complete command because we have partial flags */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/31e23b2c/newt/newt.go
----------------------------------------------------------------------
diff --git a/newt/newt.go b/newt/newt.go
index a09e57c..0dc8808 100644
--- a/newt/newt.go
+++ b/newt/newt.go
@@ -140,6 +140,7 @@ func main() {
 	cmd := newtCmd()
 
 	cli.AddBuildCommands(cmd)
+	cli.AddCompleteCommands(cmd)
 	cli.AddImageCommands(cmd)
 	cli.AddPackageCommands(cmd)
 	cli.AddProjectCommands(cmd)