"Das U-Boot" Source Tree
at master 77 lines 1.4 kB view raw
1.. SPDX-License-Identifier: GPL-2.0+ 2 3.. index:: 4 single: cli (command) 5 6cli command 7=========== 8 9Synopsis 10-------- 11 12:: 13 14 cli get 15 cli set cli_flavor 16 17Description 18----------- 19 20The cli command permits getting and changing the current parser at runtime. 21 22cli get 23~~~~~~~ 24 25It shows the current value of the parser used by the CLI. 26 27cli set 28~~~~~~~ 29 30It permits setting the value of the parser used by the CLI. 31 32Possible values are old and modern. 33Note that, to use a specific parser its code should have been compiled, that 34is to say you need to enable the corresponding CONFIG_HUSH*. 35Otherwise, an error message is printed. 36 37Examples 38-------- 39 40Get the current parser:: 41 42 => cli get 43 old 44 45Change the current parser:: 46 47 => cli get 48 old 49 => cli set modern 50 => cli get 51 modern 52 => cli set old 53 => cli get 54 old 55 56Trying to set the current parser to an unknown value:: 57 58 => cli set foo 59 Bad value for parser name: foo 60 cli - cli 61 62 Usage: 63 cli get - print current cli 64 set - set the current cli, possible values are: old, modern 65 66Trying to set the current parser to a correct value but its code was not 67compiled:: 68 69 => cli get 70 modern 71 => cli set old 72 Want to set current parser to old, but its code was not compiled! 73 74Return value 75------------ 76 77The return value $? indicates whether the command succeeded.