You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/10/01 15:38:50 UTC

[GitHub] mkiiskila closed pull request #105: cli; mention 'save' as a possible action with 'config' command.

mkiiskila closed pull request #105: cli; mention 'save' as a possible action with 'config' command.
URL: https://github.com/apache/mynewt-newtmgr/pull/105
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/newtmgr/cli/config.go b/newtmgr/cli/config.go
index d8608399..f91337eb 100644
--- a/newtmgr/cli/config.go
+++ b/newtmgr/cli/config.go
@@ -106,12 +106,17 @@ func configRunCmd(cmd *cobra.Command, args []string) {
 
 func configCmd() *cobra.Command {
 	configCmdLongHelp := "Read or write a config value for <var-name> variable on " +
-		"a device.\nSpecify a var-value to write a value to a device.\n"
+		"a device.\nSpecify a var-value to write a value to a device.\n" +
+		"To persist existing configuration use 'save' as the var-name.\n"
+	configEx := "    " + nmutil.ToolInfo.ExeName + " -c olimex config test/8\n"
+	configEx += "    " + nmutil.ToolInfo.ExeName + " -c olimex config test/8 1\n"
+	configEx += "    " + nmutil.ToolInfo.ExeName + " -c olimex config save\n"
 	configCmd := &cobra.Command{
-		Use:   "config <var-name> [var-value] -c <conn_profile>",
-		Short: "Read or write a config value on a device",
-		Long:  configCmdLongHelp,
-		Run:   configRunCmd,
+		Use:     "config <var-name> [var-value] -c <conn_profile>",
+		Short:   "Read or write a config value on a device",
+		Long:    configCmdLongHelp,
+		Example: configEx,
+		Run:     configRunCmd,
 	}
 
 	return configCmd


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services