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:17:15 UTC

[41/50] [abbrv] 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 comple

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/c2463633
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/c2463633
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/c2463633

Branch: refs/heads/master
Commit: c24636335663b08a7583321ce64dc264e0c34454
Parents: abf65d3
Author: cwanda <wa...@happycity.com>
Authored: Thu Mar 2 20:25:57 2017 -0800
Committer: cwanda <wa...@happycity.com>
Committed: Thu Mar 2 20:51:08 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/c2463633/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/c2463633/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)