Commit 59c851ed authored by Cristian Maglie's avatar Cristian Maglie

Fixed some commands descriptions

parent 68d7520e
...@@ -41,8 +41,8 @@ func initAttachCommand() *cobra.Command { ...@@ -41,8 +41,8 @@ func initAttachCommand() *cobra.Command {
Short: "Attaches a sketch to a board.", Short: "Attaches a sketch to a board.",
Long: "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" +
"arduino board attach serial:///dev/tty/ACM0 HelloWorld\n" + " " + commands.AppName + " board attach serial:///dev/tty/ACM0 HelloWorld\n" +
"arduino board attach arduino:samd:mkr1000", " " + commands.AppName + " board attach arduino:samd:mkr1000",
Args: cobra.RangeArgs(1, 2), Args: cobra.RangeArgs(1, 2),
Run: runAttachCommand, Run: runAttachCommand,
} }
......
...@@ -35,7 +35,7 @@ func initListCommand() *cobra.Command { ...@@ -35,7 +35,7 @@ func initListCommand() *cobra.Command {
Use: "list", Use: "list",
Short: "List connected boards.", Short: "List connected boards.",
Long: "Detects and displays a list of connected boards to the current computer.", Long: "Detects and displays a list of connected boards to the current computer.",
Example: "arduino board list --timeout 10s", Example: " " + commands.AppName + " board list --timeout 10s",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: runListCommand, Run: runListCommand,
} }
......
...@@ -31,7 +31,7 @@ func initListAllCommand() *cobra.Command { ...@@ -31,7 +31,7 @@ func initListAllCommand() *cobra.Command {
Use: "listall", Use: "listall",
Short: "List all known boards.", Short: "List all known boards.",
Long: "List all boards that have the support platform installed.", Long: "List all boards that have the support platform installed.",
Example: "arduino board listall", Example: " " + commands.AppName + " board listall",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: runListAllCommand, Run: runListAllCommand,
} }
......
...@@ -32,7 +32,7 @@ func initDumpCommand() *cobra.Command { ...@@ -32,7 +32,7 @@ func initDumpCommand() *cobra.Command {
Use: "dump", Use: "dump",
Short: "Prints the current configuration", Short: "Prints the current configuration",
Long: "Prints the current configuration.", Long: "Prints the current configuration.",
Example: "arduino config dump", Example: " " + commands.AppName + " config dump",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: runDumpCommand, Run: runDumpCommand,
} }
......
...@@ -32,8 +32,10 @@ func initInitCommand() *cobra.Command { ...@@ -32,8 +32,10 @@ func initInitCommand() *cobra.Command {
Short: "Initializes a new config file into the default location.", Short: "Initializes a new config file into the default location.",
Long: "Initializes a new config file into the default location ($EXE_DIR/cli-config.yml).", Long: "Initializes a new config file into the default location ($EXE_DIR/cli-config.yml).",
Example: "" + Example: "" +
"arduino config init # Creates a config file by asking questions to the user into the default location.\n" + " # Creates a config file by asking questions to the user into the default location.\n" +
"arduino config init --default # Creates a config file with default configuration into default location.", " " + commands.AppName + " config init\n\n" +
" # Creates a config file with default configuration into default location.\n" +
" " + commands.AppName + " config init --default\n",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: runInitCommand, Run: runInitCommand,
} }
......
...@@ -34,8 +34,8 @@ func initDownloadCommand() *cobra.Command { ...@@ -34,8 +34,8 @@ func initDownloadCommand() *cobra.Command {
Short: "Downloads one or more cores and corresponding tool dependencies.", Short: "Downloads one or more cores and corresponding tool dependencies.",
Long: "Downloads one or more cores and corresponding tool dependencies.", Long: "Downloads one or more cores and corresponding tool dependencies.",
Example: "" + Example: "" +
"arduino core download arduino:samd # to download the latest version of arduino SAMD core.\n" + " " + commands.AppName + "core download arduino:samd # to download the latest version of arduino SAMD core.\n" +
"arduino core download arduino:samd=1.6.9 # for a specific version (in this case 1.6.9).", " " + commands.AppName + "core download arduino:samd=1.6.9 # for a specific version (in this case 1.6.9).",
Args: cobra.MinimumNArgs(1), Args: cobra.MinimumNArgs(1),
Run: runDownloadCommand, Run: runDownloadCommand,
} }
......
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
func initInstallCommand() *cobra.Command { func initInstallCommand() *cobra.Command {
installCommand := &cobra.Command{ installCommand := &cobra.Command{
Use: "install [PACKAGER:ARCH[=VERSION]](S)", Use: "install PACKAGER:ARCH[@VERSION] ...",
Short: "Installs one or more cores and corresponding tool dependencies.", Short: "Installs one or more cores and corresponding tool dependencies.",
Long: "Installs one or more cores and corresponding tool dependencies.", Long: "Installs one or more cores and corresponding tool dependencies.",
Example: "" + Example: "" +
......
...@@ -31,7 +31,7 @@ func initListCommand() *cobra.Command { ...@@ -31,7 +31,7 @@ func initListCommand() *cobra.Command {
Short: "Shows the list of installed cores.", Short: "Shows the list of installed cores.",
Long: "Shows the list of installed cores.\n" + Long: "Shows the list of installed cores.\n" +
"With -v tag (up to 2 times) can provide more verbose output.", "With -v tag (up to 2 times) can provide more verbose output.",
Example: "arduino core list -v # for a medium verbosity level.", Example: " " + commands.AppName + "core list -v # for a medium verbosity level.",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: runListCommand, Run: runListCommand,
} }
......
...@@ -32,7 +32,7 @@ func initSearchCommand() *cobra.Command { ...@@ -32,7 +32,7 @@ func initSearchCommand() *cobra.Command {
Use: "search <keywords...>", Use: "search <keywords...>",
Short: "Search for a core in the package index.", Short: "Search for a core in the package index.",
Long: "Search for a core in the package index using the specified keywords.", Long: "Search for a core in the package index using the specified keywords.",
Example: "arduino core search MKRZero -v", Example: " " + commands.AppName + " core search MKRZero -v",
Args: cobra.MinimumNArgs(1), Args: cobra.MinimumNArgs(1),
Run: runSearchCommand, Run: runSearchCommand,
} }
......
...@@ -37,7 +37,7 @@ func initUpdateIndexCommand() *cobra.Command { ...@@ -37,7 +37,7 @@ func initUpdateIndexCommand() *cobra.Command {
Use: "update-index", Use: "update-index",
Short: "Updates the index of cores.", Short: "Updates the index of cores.",
Long: "Updates the index of cores to the latest version.", Long: "Updates the index of cores to the latest version.",
Example: "arduino core update-index", Example: " " + commands.AppName + " core update-index",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: runUpdateIndexCommand, Run: runUpdateIndexCommand,
} }
......
...@@ -34,8 +34,8 @@ func initDownloadCommand() *cobra.Command { ...@@ -34,8 +34,8 @@ func initDownloadCommand() *cobra.Command {
Short: "Downloads one or more libraries without installing them.", Short: "Downloads one or more libraries without installing them.",
Long: "Downloads one or more libraries without installing them.", Long: "Downloads one or more libraries without installing them.",
Example: "" + Example: "" +
"arduino lib download AudioZero # for the latest version.\n" + " " + commands.AppName + " lib download AudioZero # for the latest version.\n" +
"arduino lib download AudioZero@1.0.0 # for a specific version.", " " + commands.AppName + " lib download AudioZero@1.0.0 # for a specific version.",
Args: cobra.MinimumNArgs(1), Args: cobra.MinimumNArgs(1),
Run: runDownloadCommand, Run: runDownloadCommand,
} }
......
...@@ -34,8 +34,8 @@ func initInstallCommand() *cobra.Command { ...@@ -34,8 +34,8 @@ func initInstallCommand() *cobra.Command {
Short: "Installs one of more specified libraries into the system.", Short: "Installs one of more specified libraries into the system.",
Long: "Installs one or more specified libraries into the system.", Long: "Installs one or more specified libraries into the system.",
Example: "" + Example: "" +
"arduino lib install AudioZero # for the latest version.\n" + " " + commands.AppName + " lib install AudioZero # for the latest version.\n" +
"arduino lib install AudioZero@1.0.0 # for the specific version.", " " + commands.AppName + " lib install AudioZero@1.0.0 # for the specific version.",
Args: cobra.MinimumNArgs(1), Args: cobra.MinimumNArgs(1),
Run: runInstallCommand, Run: runInstallCommand,
} }
......
...@@ -35,8 +35,8 @@ func initListCommand() *cobra.Command { ...@@ -35,8 +35,8 @@ func initListCommand() *cobra.Command {
Long: "Shows a list of all installed libraries.\n" + Long: "Shows a list of all installed libraries.\n" +
"Can be used with -v (or --verbose) flag (up to 2 times) to have longer output.", "Can be used with -v (or --verbose) flag (up to 2 times) to have longer output.",
Example: "" + Example: "" +
"arduino lib list # to show all installed library names.\n" + " " + commands.AppName + " lib list # to show all installed library names.\n" +
"arduino lib list -v # to show more details.", " " + commands.AppName + " lib list -v # to show more details.",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: runListCommand, Run: runListCommand,
} }
......
...@@ -34,7 +34,7 @@ func initSearchCommand() *cobra.Command { ...@@ -34,7 +34,7 @@ func initSearchCommand() *cobra.Command {
Use: "search [LIBRARY_NAME]", Use: "search [LIBRARY_NAME]",
Short: "Searchs for one or more libraries data.", Short: "Searchs for one or more libraries data.",
Long: "Search for one or more libraries data (case insensitive search).", Long: "Search for one or more libraries data (case insensitive search).",
Example: "arduino lib search audio", Example: " " + commands.AppName + " lib search audio",
Args: cobra.ArbitraryArgs, Args: cobra.ArbitraryArgs,
Run: runSearchCommand, Run: runSearchCommand,
} }
......
...@@ -37,7 +37,7 @@ func initUninstallCommand() *cobra.Command { ...@@ -37,7 +37,7 @@ func initUninstallCommand() *cobra.Command {
Use: "uninstall LIBRARY_NAME(S)", Use: "uninstall LIBRARY_NAME(S)",
Short: "Uninstalls one or more libraries.", Short: "Uninstalls one or more libraries.",
Long: "Uninstalls one or more libraries.", Long: "Uninstalls one or more libraries.",
Example: "arduino lib uninstall AudioZero", Example: " " + commands.AppName + " lib uninstall AudioZero",
Args: cobra.MinimumNArgs(1), Args: cobra.MinimumNArgs(1),
Run: runUninstallCommand, Run: runUninstallCommand,
} }
......
...@@ -27,7 +27,7 @@ func initUpdateIndexCommand() *cobra.Command { ...@@ -27,7 +27,7 @@ func initUpdateIndexCommand() *cobra.Command {
Use: "update-index", Use: "update-index",
Short: "Updates the libraries index.", Short: "Updates the libraries index.",
Long: "Updates the libraries index to the latest version.", Long: "Updates the libraries index to the latest version.",
Example: "arduino lib update-index", Example: " " + commands.AppName + " lib update-index",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
lm := commands.InitLibraryManager(nil) lm := commands.InitLibraryManager(nil)
......
...@@ -30,7 +30,7 @@ func initUpgradeCommand() *cobra.Command { ...@@ -30,7 +30,7 @@ func initUpgradeCommand() *cobra.Command {
Short: "Upgrades installed libraries.", Short: "Upgrades installed libraries.",
Long: "This command ungrades all installed libraries to the latest available version." + Long: "This command ungrades all installed libraries to the latest available version." +
"To upgrade a single library use the 'install' command.", "To upgrade a single library use the 'install' command.",
Example: "arduino lib upgrade", Example: " " + commands.AppName + " lib upgrade",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: runUpgradeCommand, Run: runUpgradeCommand,
} }
......
...@@ -45,7 +45,7 @@ func Init() *cobra.Command { ...@@ -45,7 +45,7 @@ func Init() *cobra.Command {
Use: "arduino-cli", Use: "arduino-cli",
Short: "Arduino CLI.", Short: "Arduino CLI.",
Long: "Arduino Command Line Interface (arduino-cli).", Long: "Arduino Command Line Interface (arduino-cli).",
Example: "arduino <command> [flags...]", Example: " " + commands.AppName + " <command> [flags...]",
PersistentPreRun: preRun, PersistentPreRun: preRun,
} }
command.PersistentFlags().BoolVar(&commands.GlobalFlags.Debug, "debug", false, "Enables debug output (super verbose, used to debug the CLI).") command.PersistentFlags().BoolVar(&commands.GlobalFlags.Debug, "debug", false, "Enables debug output (super verbose, used to debug the CLI).")
......
...@@ -30,7 +30,7 @@ func initNewCommand() *cobra.Command { ...@@ -30,7 +30,7 @@ func initNewCommand() *cobra.Command {
Use: "new", Use: "new",
Short: "Create a new Sketch", Short: "Create a new Sketch",
Long: "Create a new Sketch", Long: "Create a new Sketch",
Example: "arduino sketch new MultiBlinker", Example: " " + commands.AppName + " sketch new MultiBlinker",
Args: cobra.ExactArgs(1), Args: cobra.ExactArgs(1),
Run: runNewCommand, Run: runNewCommand,
} }
......
...@@ -53,7 +53,7 @@ func initSyncCommand() *cobra.Command { ...@@ -53,7 +53,7 @@ func initSyncCommand() *cobra.Command {
Use: "sync", Use: "sync",
Short: "Arduino CLI Sketch Commands.", Short: "Arduino CLI Sketch Commands.",
Long: "Arduino CLI Sketch Commands.", Long: "Arduino CLI Sketch Commands.",
Example: "arduino sketch sync", Example: " " + commands.AppName + " sketch sync",
Args: cobra.NoArgs, Args: cobra.NoArgs,
Run: runSyncCommand, Run: runSyncCommand,
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment