
Dear Tom,
In message 20190331113756.GG18421@bill-the-cat you wrote:
You could say the same for any online help. I do not understand why you consider these commands not worth a description while we provide online help for all other commands including "test", "echo", "help" and even "?".
All the other commands are U-Boot specific. The Hush shell is not - it has been borrowed from elsewhere (Busybox) and the features Heinrich finds worth documenting are these of more or less any other (non-C) shell.
Maybe a tiny bit more context is useful here. Over at https://stackoverflow.com/questions/55381641/how-to-test-the-return-of-a-com... Heinrich's initial answer was different as he didn't know we had 'if' under HUSH_PARSER. The initial poster also didn't have any idea on how the syntax for 'if' worked for us. That tells me there's probably other folks out there that also don't know and we should provide a little help.
Is argument backfires on two accounts: First, the original poster already _knew_ that we have "if" / "then" / "else"; what he didn't know is shell syntax in general; I have no idea how he came up with something like "test {gpio status 50}" - this doesn;t work in any command interpeter I know. Second, what this original poster was trying to do is command substitution (I think), which we don;t have.
So the patch explains hat this poster already knew, and fails to explain that we don't have any redirection or command substitution.
Existing U-Boot documentation mantions in several places that there are two command line interfaces: a very simple one, and the Hush shell. So if you need information about Hush shell syntax, the usual approach would be something like [1], which shows [2] as first link, and [3] as second link - and this explanation is definitely more helpful than the suggested patch.
Even with the patch there is - for example - still no explanation in the online help about the difference between environment variables and shell variables.
Yes, I agree, we need (more and better) documentation. But not everything needs to be documented as part of the online help.
This patch just costs memory footprint for extremely little (and questionable) benefit.
Best regards,
Wolfgang Denk