Strangely this doesn't work:
#!/bin/execlineb
redirfd -r 0 /dev/tty
withstdinas -D "" LINE
importas -u LINE LINE
foreground { $LINE }
execlineb -c "dollarat -0"
With a slightly modified version I had multiline input terminated with Ctrl+d.
In comparison with
#!/bin/execlineb
redirfd -r 0 /dev/tty
forstdin -d"\n" LINE
importas -u LINE LINE
execlineb -c "foreground { pipeline { ps -e } grep -e execlineb } $LINE"
the former version would have no persistent process.
On Sun, Apr 16, 2017 at 11:01 AM, Vincent <b21enu_at_gmail.com> wrote:
> Great! Thanks!
> This is now my main shell!
>
>
> On Sun, Apr 16, 2017 at 10:37 AM, Laurent Bercot
> <ska-skaware_at_skarnet.org> wrote:
>>> What I am trying to write, is a minimal interpreter read-eval loop,
>>> which gets its $INPUT from /dev/tty.
>>
>>
>> How about this?
>>
>> redirfd -r 0 /dev/tty
>> forstdin -d"\n" LINE
>> importas -u LINE LINE
>> execlineb -c $LINE
>>
>> --
>> Laurent
>>
Received on Mon Apr 17 2017 - 12:44:00 UTC
This archive was generated by hypermail 2.3.0
: Sun May 09 2021 - 19:38:49 UTC