From a2f32f39e1f31169387bf6700b9ad90483abcfc6 Mon Sep 17 00:00:00 2001 From: Gianluca Varisco Date: Wed, 26 Sep 2018 01:28:22 +0200 Subject: [PATCH 1/2] Fixed commands used as examples for CLI board commands This commit fixes the text for the examples used when typing 'arduino-cli board attach' and 'arduino-cli board' as they shown the wrong commands (wrong AppName in the 'board attach' command, non-existing '--board' and '--sketch' arguments in 'board' command) --- commands/board/attach.go | 2 +- commands/board/board.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/board/attach.go b/commands/board/attach.go index 29142061728..f3a4a165c26 100644 --- a/commands/board/attach.go +++ b/commands/board/attach.go @@ -40,7 +40,7 @@ func initAttachCommand() *cobra.Command { Use: "attach | [sketchPath]", Short: "Attaches a sketch to a board.", Long: "Attaches a sketch to a board.", - Example: "arduino board attach serial:///dev/tty/ACM0\n" + + Example: " arduino board attach serial:///dev/tty/ACM0\n" + " " + commands.AppName + " board attach serial:///dev/tty/ACM0 HelloWorld\n" + " " + commands.AppName + " board attach arduino:samd:mkr1000", Args: cobra.RangeArgs(1, 2), diff --git a/commands/board/board.go b/commands/board/board.go index 136b03fb405..0e005d2a28a 100644 --- a/commands/board/board.go +++ b/commands/board/board.go @@ -31,7 +31,7 @@ func InitCommand() *cobra.Command { Example: " # Lists all connected boards.\n" + " " + commands.AppName + " board list\n\n" + " # Attaches a sketch to a board.\n" + - " " + commands.AppName + " board attach --board serial:///dev/tty/ACM0 --sketch mySketch", + " " + commands.AppName + " board attach serial:///dev/tty/ACM0 mySketch", } boardCommand.AddCommand(initAttachCommand()) boardCommand.AddCommand(initListCommand()) From 256dd3b5ca9928579ce564ab9987bfbc76c07fc6 Mon Sep 17 00:00:00 2001 From: Gianluca Varisco Date: Wed, 26 Sep 2018 01:39:26 +0200 Subject: [PATCH 2/2] Replaced hardcoded 'arduino' cmd with commands.AppName --- commands/board/attach.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/board/attach.go b/commands/board/attach.go index f3a4a165c26..9f7e5516358 100644 --- a/commands/board/attach.go +++ b/commands/board/attach.go @@ -40,7 +40,7 @@ func initAttachCommand() *cobra.Command { Use: "attach | [sketchPath]", Short: "Attaches a sketch to a board.", Long: "Attaches a sketch to a board.", - Example: " arduino board attach serial:///dev/tty/ACM0\n" + + Example: " " + commands.AppName + " board attach serial:///dev/tty/ACM0\n" + " " + commands.AppName + " board attach serial:///dev/tty/ACM0 HelloWorld\n" + " " + commands.AppName + " board attach arduino:samd:mkr1000", Args: cobra.RangeArgs(1, 2),