Re: [ast-developers] [BUG] ${.sh.subshell} broken

2016-10-17 Thread Martijn Dekker
Op 18-10-16 om 00:15 schreef Martijn Dekker: > Turns out you don't actually have to read ${.sh.subshell} twice: it is > the output redirection within a command substitution that kills > ${.sh.subshell}. This is finally starting to make some sense now. > > $ echo $( (: 1>&1; echo ${.sh.subshell}) )

Re: [ast-developers] [BUG] ${.sh.subshell} broken

2016-10-17 Thread Martijn Dekker
Op 17-10-16 om 22:58 schreef Martijn Dekker: > But look what happens if you add a redirection, even a no-op one like 1>&1: > > $ echo $( (echo ${.sh.subshell} 1>&1; echo ${.sh.subshell} 1>&1) ) > 2 0 Turns out you don't actually have to read ${.sh.subshell} twice: it is the output redirection wit

Re: [ast-developers] [BUG] ${.sh.subshell} broken

2016-10-17 Thread Martijn Dekker
Op 17-10-16 om 21:40 schreef Martijn Dekker: > I need this capability for my shell library to support ksh93. If anyone > can think of any workarounds, please let me know. Of course I can't just let stuff like this go... The bug occurs under really bizarrely specific circumstances. This works fin