Files
u-boot/common
Francis Laniel d8b256308d cli: hush_modern: Enable using < and > as string compare operators
In Busybox hush, '<' and '>' are used as redirection operators.
For example, cat foo > bar will write content of file foo inside file bar.
In U-Boot, we do not have file system, so we can hardly redirect command output
inside a file.

But, in actual U-Boot hush, these operators ('<' and '>') are used as string
compare operators.
For example, test aaa < bbb returns 0 as aaa is before bbb in the dictionary.
Busybox hush also permits this, but operators need to be escaped ('\<' and
'\>').
Indeed, if escaping is needed it permits the developer to think about its code,
as in a lot of case, we want to compare integers (using '-lt' or '-gt') rather
than strings.

As testing in U-Boot is handled by the test command, we will stick with the
original behaviour and not adapt to Busybox one.

Nonetheless, if one day we decide to implement test with '[[ ]]', we will then
stick to upstream Busybox behavior.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-28 12:02:56 -05:00
..
2023-12-18 09:55:32 -05:00
2023-10-06 14:38:13 -04:00
2023-11-14 20:04:01 -07:00
2022-11-02 08:42:03 +01:00
2022-01-19 18:11:34 +01:00
2023-10-23 17:07:06 +03:00
2022-08-04 16:18:47 -04:00
2023-07-17 17:12:07 +08:00
2023-12-13 11:51:24 -05:00
2023-06-23 14:38:16 -04:00
2023-11-29 09:32:15 -05:00
2023-10-09 15:24:31 -04:00
2023-05-13 09:52:32 -04:00