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

Fixed some commands descriptions

parent 68d7520e
......@@ -41,8 +41,8 @@ func initAttachCommand() *cobra.Command {
Short: "Attaches a sketch to a board.",
Long: "Attaches a sketch to a board.",
Example: "arduino board attach serial:///dev/tty/ACM0\n" +
"arduino board attach serial:///dev/tty/ACM0 HelloWorld\n" +
"arduino board attach arduino:samd:mkr1000",
" " + commands.AppName + " board attach serial:///dev/tty/ACM0 HelloWorld\n" +
" " + commands.AppName + " board attach arduino:samd:mkr1000",
Args: cobra.RangeArgs(1, 2),
Run: runAttachCommand,
}
......
......@@ -35,7 +35,7 @@ func initListCommand() *cobra.Command {
Use: "list",
Short: "List connected boards.",
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,
Run: runListCommand,
}
......
......@@ -31,7 +31,7 @@ func initListAllCommand() *cobra.Command {
Use: "listall",
Short: "List all known boards.",
Long: "List all boards that have the support platform installed.",
Example: "arduino board listall",
Example: " " + commands.AppName + " board listall",
Args: cobra.NoArgs,
Run: runListAllCommand,
}
......
......@@ -32,7 +32,7 @@ func initDumpCommand() *cobra.Command {
Use: "dump",
Short: "Prints the current configuration",
Long: "Prints the current configuration.",
Example: "arduino config dump",
Example: " " + commands.AppName + " config dump",
Args: cobra.NoArgs,
Run: runDumpCommand,
}
......
......@@ -32,8 +32,10 @@ func initInitCommand() *cobra.Command {
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).",
Example: "" +
"arduino config init # 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.",
" # Creates a config file by asking questions to the user into the default location.\n" +
" " + 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,
Run: runInitCommand,
}
......
......@@ -34,8 +34,8 @@ func initDownloadCommand() *cobra.Command {
Short: "Downloads one or more cores and corresponding tool dependencies.",
Long: "Downloads one or more cores and corresponding tool dependencies.",
Example: "" +
"arduino 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 # to download the latest version of arduino SAMD core.\n" +
" " + commands.AppName + "core download arduino:samd=1.6.9 # for a specific version (in this case 1.6.9).",
Args: cobra.MinimumNArgs(1),
Run: runDownloadCommand,
}
......
......@@ -29,7 +29,7 @@ import (
func initInstallCommand() *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.",
Long: "Installs one or more cores and corresponding tool dependencies.",
Example: "" +
......
......@@ -31,7 +31,7 @@ func initListCommand() *cobra.Command {
Short: "Shows the list of installed cores.",
Long: "Shows the list of installed cores.\n" +
"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,
Run: runListCommand,
}
......
......@@ -32,7 +32,7 @@ func initSearchCommand() *cobra.Command {
Use: "search <keywords...>",
Short: "Search for a core in the package index.",
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),
Run: runSearchCommand,
}
......
......@@ -37,7 +37,7 @@ func initUpdateIndexCommand() *cobra.Command {
Use: "update-index",
Short: "Updates the index of cores.",
Long: "Updates the index of cores to the latest version.",
Example: "arduino core update-index",
Example: " " + commands.AppName + " core update-index",
Args: cobra.NoArgs,
Run: runUpdateIndexCommand,
}
......
......@@ -34,8 +34,8 @@ func initDownloadCommand() *cobra.Command {
Short: "Downloads one or more libraries without installing them.",
Long: "Downloads one or more libraries without installing them.",
Example: "" +
"arduino lib download AudioZero # for the latest version.\n" +
"arduino lib download AudioZero@1.0.0 # for a specific version.",
" " + commands.AppName + " lib download AudioZero # for the latest version.\n" +
" " + commands.AppName + " lib download AudioZero@1.0.0 # for a specific version.",
Args: cobra.MinimumNArgs(1),
Run: runDownloadCommand,
}
......
......@@ -34,8 +34,8 @@ func initInstallCommand() *cobra.Command {
Short: "Installs one of more specified libraries into the system.",
Long: "Installs one or more specified libraries into the system.",
Example: "" +
"arduino lib install AudioZero # for the latest version.\n" +
"arduino lib install AudioZero@1.0.0 # for the specific version.",
" " + commands.AppName + " lib install AudioZero # for the latest version.\n" +
" " + commands.AppName + " lib install AudioZero@1.0.0 # for the specific version.",
Args: cobra.MinimumNArgs(1),
Run: runInstallCommand,
}
......
......@@ -35,8 +35,8 @@ func initListCommand() *cobra.Command {
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.",
Example: "" +
"arduino lib list # to show all installed library names.\n" +
"arduino lib list -v # to show more details.",
" " + commands.AppName + " lib list # to show all installed library names.\n" +
" " + commands.AppName + " lib list -v # to show more details.",
Args: cobra.NoArgs,
Run: runListCommand,
}
......
......@@ -34,7 +34,7 @@ func initSearchCommand() *cobra.Command {
Use: "search [LIBRARY_NAME]",
Short: "Searchs for one or more libraries data.",
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,
Run: runSearchCommand,
}
......
......@@ -37,7 +37,7 @@ func initUninstallCommand() *cobra.Command {
Use: "uninstall LIBRARY_NAME(S)",
Short: "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),
Run: runUninstallCommand,
}
......
......@@ -27,7 +27,7 @@ func initUpdateIndexCommand() *cobra.Command {
Use: "update-index",
Short: "Updates the libraries index.",
Long: "Updates the libraries index to the latest version.",
Example: "arduino lib update-index",
Example: " " + commands.AppName + " lib update-index",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
lm := commands.InitLibraryManager(nil)
......
......@@ -30,7 +30,7 @@ func initUpgradeCommand() *cobra.Command {
Short: "Upgrades installed libraries.",
Long: "This command ungrades all installed libraries to the latest available version." +
"To upgrade a single library use the 'install' command.",
Example: "arduino lib upgrade",
Example: " " + commands.AppName + " lib upgrade",
Args: cobra.NoArgs,
Run: runUpgradeCommand,
}
......
......@@ -45,7 +45,7 @@ func Init() *cobra.Command {
Use: "arduino-cli",
Short: "Arduino CLI.",
Long: "Arduino Command Line Interface (arduino-cli).",
Example: "arduino <command> [flags...]",
Example: " " + commands.AppName + " <command> [flags...]",
PersistentPreRun: preRun,
}
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 {
Use: "new",
Short: "Create a new Sketch",
Long: "Create a new Sketch",
Example: "arduino sketch new MultiBlinker",
Example: " " + commands.AppName + " sketch new MultiBlinker",
Args: cobra.ExactArgs(1),
Run: runNewCommand,
}
......
......@@ -53,7 +53,7 @@ func initSyncCommand() *cobra.Command {
Use: "sync",
Short: "Arduino CLI Sketch Commands.",
Long: "Arduino CLI Sketch Commands.",
Example: "arduino sketch sync",
Example: " " + commands.AppName + " sketch sync",
Args: cobra.NoArgs,
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