summaryrefslogtreecommitdiff
path: root/doc/usage/cmd/setexpr.rst
AgeCommit message (Collapse)Author
2025-10-26doc: usage: Add general rule for `$?`Tom Rini
For nearly all commands in U-Boot the '?' variable is handled the same way with 0 meaning success, 1 meaning any failure. Explain this in the general rules section of the cmdline documentation (with a link to a counter example) and then remove the redundant wording from most commands. We retain a section about the return value in a number of places where we are doing something such as always returning a specific value or we have useful additional information to go along with the normal return codes. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2025-05-29doc: document test commandRasmus Villemoes
Add documentation for the test command, including the newly added =~ operator and some gotchas wrt. the numeric comparisons. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2024-03-02cmd: setexpr: fix no matching string in gsub return empty valueMassimiliano Minella
In gsub, when the destination string is empty, the string 't' is provided and the regular expression doesn't match, then the final result is an empty string. Example: => echo ${foo} => setenv foo => setexpr foo gsub e a bar => echo ${foo} => The variable ${foo} should contain "bar" and the lack of match shouldn't be considered an error. This patch fixes the erroneous behavior by removing the return statement and breaking out of the loop in case of lack of match. Also add a test for the no match case. Signed-off-by: Massimiliano Minella <[email protected]>
2024-01-17doc: create index entries for commandsHeinrich Schuchardt
Add the description of CLI commands to the generated index. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-10doc: complete setexpr configuration informationHeinrich Schuchardt
Add missing information to the configuration section of the setexpr man-page. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-03-31doc: usage: Group all shell command docs into cmd/ sub-directoryBin Meng
Currently all shell command docs are put in the doc/usage root. Let's group them into cmd/ sub-directory. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>