diff options
| author | Tom Rini <[email protected]> | 2024-01-08 12:00:18 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-01-08 12:00:18 -0500 |
| commit | 93d91e9485d902a1836a22e72d1a545b587adf36 (patch) | |
| tree | f368b4e3c2220e7cd34c83bf192d8b674158d16b /doc/usage/cmd/cli.rst | |
| parent | 866ca972d6c3cabeaf6dbac431e8e08bb30b3c8e (diff) | |
| parent | f28a77589e7505535a4eebdc7269df98f67dbe68 (diff) | |
Merge branch 'next'
Diffstat (limited to 'doc/usage/cmd/cli.rst')
| -rw-r--r-- | doc/usage/cmd/cli.rst | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/doc/usage/cmd/cli.rst b/doc/usage/cmd/cli.rst new file mode 100644 index 00000000000..a0cf5958fb9 --- /dev/null +++ b/doc/usage/cmd/cli.rst @@ -0,0 +1,74 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +cli command +=========== + +Synopis +------- + +:: + + cli get + cli set cli_flavor + +Description +----------- + +The cli command permits getting and changing the current parser at runtime. + +cli get +~~~~~~~ + +It shows the current value of the parser used by the CLI. + +cli set +~~~~~~~ + +It permits setting the value of the parser used by the CLI. + +Possible values are old and modern. +Note that, to use a specific parser its code should have been compiled, that +is to say you need to enable the corresponding CONFIG_HUSH*. +Otherwise, an error message is printed. + +Examples +-------- + +Get the current parser:: + + => cli get + old + +Change the current parser:: + + => cli get + old + => cli set modern + => cli get + modern + => cli set old + => cli get + old + +Trying to set the current parser to an unknown value:: + + => cli set foo + Bad value for parser name: foo + cli - cli + + Usage: + cli get - print current cli + set - set the current cli, possible values are: old, modern + +Trying to set the current parser to a correct value but its code was not +compiled:: + + => cli get + modern + => cli set old + Want to set current parser to old, but its code was not compiled! + +Return value +------------ + +The return value $? indicates whether the command succeeded. |
