Martijn Dekker dixit: >Define "legit" and "weird" (and explain how they're mutually exclusive). ;-)
;-) >What I'm doing is this: >https://github.com/modernish/modernish#use-varsetlocal #user-content-use-varsetlocal by the way. I see. I can also see the benefit of expanding the aliases at the time of the _first_ parse (especially later on…). Ordinarily, TPAREN parsing ought to do the trick… hmm… tg@blau:~ $ alias echo=print tg@blau:~ $ x() { echo a; (echo b); x=$(echo c); } tg@blau:~ $ typeset -f x x() { print a ( print b ) x=$(echo c ) } (Defining a function then dumping it is a popular way in mksh to figure out how things are parsed.) This is likely due to the… sALIAS = 0; in front of that in yyrecursive() in syn.c; we could certainly try to do with it enabled. BUT! static int sALIAS = ALIAS; /* 0 in yyrecursive */ This was introduced at the time yyrecursive() was. There likely has been some kind of reason… ah! comsub-5. Aliases were expanded twice otherwise. So… well, it’s still more useful at parse time than at runtime. >So no, this does not really need to be supported in command >substitutions or any other subshells. But I do report every little >oddity I find, sometimes they're indicative of bugs. Indeed, and for that I’m thankful… please just indicate whether this is something like that or if you have an actual use case for it the next time you have something weird like this ;) bye, //mirabilos -- 22:20⎜<asarch> The crazy that persists in his craziness becomes a master 22:21⎜<asarch> And the distance between the craziness and geniality is only measured by the success 18:35⎜<asarch> "Psychotics are consistently inconsistent. The essence of sanity is to be inconsistently inconsistent