|
|
|
|
|
by rhn_mk1
2122 days ago
|
|
Thank you, that's indeed what I meant. The other, related issue is that reimplementing pieces of the shell DSL duplicates what can be done in the parent language. Taking conditional return value as an example: "ls /nofile || true;" In this case I don't really want to be given the option to use bash syntax for this. That would encourage the usage of shell idioms for "tricks" like control flow, which are another annoying part of the shell (I can never remember them). I would much prefer if there was a nice way to do that kind of things idiomatically in the parent language, and no other choice. E.g. to ignore the return value I would find it much nicer to be forced to do sth like this instead: let _ = ls('nofile'); |
|
The “xxx || true” is for ignoring error within a group of commands, which is also very common in sh “set -e” mode. Without it, the group of commands need to be divided into at least 3 parts to still capture all possible command errors. I probably need to document this part with more details.