Hi Kriangkrai, > When I run: (call 'sh "-c" "echo -n 'name: '; read name; echo $name") > It outputs "name :" and waits for input. I type something (e.g. "abc") > but nothing echo. I press the Enter key, nothing happens. I press > Ctrl-J, then it prints "abc".
Hmm, I cannot reproduce it in the same way, but I recognize that this is a problem in general. In both cases when I either run it without line editing: $ bin/picolisp : (call 'sh "-c" "echo -n 'name: '; read name; echo $name") name: -> T or with: $ ./p dbg.l : (call 'sh "-c" "echo -n 'name: '; read name; echo $name") name: -> T it immediately returns, meaning that the 'read' got EOF immediately. Not sure if this is correct behavior. On the other hand, things like : (vi "file") work well. How is that in your case? > It works fine, but after returning to PicoLisp prompt, line editing broke. > How to solve this this problem? We could either insert setCooked() and setRaw() calls to the child part of doCall() (not tried), or do it on the Lisp level: : (raw NIL) (call 'sh "-c" "echo -n 'name: '; read name; echo $name") (raw T) This, however, does not show any different bahavior on my system. What is actually the purpose of that call? Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe