Hi Alex,

I've found a way to make it works, but only when I load the file in
the PicoLisp prompt, not when the file is loaded from command-line
argument.

> /tmp/t.l
   (de shell* (S)   # run shell command with interactive input
      # NB: use (call "stty") to see what options need to be toggled
      (let Opts '(icrnl icanon iexten echo echoe echok echoctl echoke)
         (call "sh" "-c" (pack "stty " (glue " " Opts) "; " S "; stty
-" (glue " -" Opts))) ))

   (shell* "echo -n 'name: '; read name; echo $name")

% ./p dbg.l
   : (load "/tmp/t.l")
   name: abc
   abc
   -> T
   : (everything still works)

% ./p dbg.l /tmp/t.l
   (just blank, not work!)
   ^C

Do you have more hint?

Best regards,
KS
-- 
UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe

Reply via email to