Open CohenArthur opened 4 years ago
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html this but without the bullshit
Any comments ?
I agree with that, but we need to decide what we categorize as bullshit :D
I can't think of other things now. Any ideas @Skallwar @CohenArthur @08A ?
I believe a needed feature is JITing shell, that way we will have a very fast shell.
If we agree that not executing existing POSIX scripts is okay, then I can think of a few:
The requirement that double-quotes be matched inside "${...}" within double-quotes and the rule for finding the matching '}' in XCU Parameter Expansion eliminate several subtle inconsistencies in expansion for historical shells in rare cases; for example:
"${foo-bar"}
yields bar when foo is not defined, and is an invalid substitution when foo is defined, in many historical shells. The differences in processing the "${...}" form have led to inconsistencies between historical systems. A consequence of this rule is that single-quotes cannot be used to quote the '}' within "${...}"; for example:
unset bar foo="${bar-'}'}"
is invalid because the "${...}" substitution contains an unpaired unescaped single-quote. The
can be used to escape the '}' in this example to achieve the desired result: unset bar foo="${bar-}}"
The differences in processing the "${...}" form have led to inconsistencies between the historical System V shell, BSD, and KornShells, and the text in the Shell and Utilities volume of POSIX.1-2017 is an attempt to converge them without breaking too many applications. The only alternative to this compromise between shells would be to make the behavior unspecified whenever the literal characters single-quote, '{', '}', and '' appear within "${...}". To write a portable script that uses these values, a user would have to assign variables; for example:
squote=\' dquote=\" lbrace='{' rbrace='}' ${foo-$squote$rbrace$squote}
None of this ^ complex variable expansion crap
$ alias while="/"
has to be removed. Aliasing reserved keywords has to be forbiddenI'd basically like to vote out anything that isn't crystal clear or that does not make sense in the spec.
I believe a needed feature is JITing shell, that way we will have a very fast shell.
Once we have a shell we can talk about JITting it :D
$ alias while="/" has to be removed. Aliasing reserved keywords has to be forbidden
this is actually easy to implement now that I understand how to write a shell
Refine it enough so that it is readable and understanble. The specs will of course evolve through the project, but they need to be here as a starting point.