[clfswm-devel] Cannot display the result of clisp shell function ?

Philippe Brochard pbrochard at common-lisp.net
Sun Oct 14 12:05:07 UTC 2012


z. axis writes:

> In the eval window, (shell "ls ~") will output nothing.
>
No, it output nothing because the command is passed to the underlying
shell and is not captured by the lisp.

What you want can be done by redirecting the shell output to a stream:

(let ((output (run-shell-command "ls ~" :output :stream))) (loop for line = (read-line output nil nil) while line do (print line)))

For what you want, you'd better use the present-clfswm-terminal function
bound to Control+F12 by default. Or an external program like guake.

But if you have often a use for this in lisp, we can add a function to
do this. Just request.

> Regards!
>
Regards,

Philippe




More information about the clfswm-devel mailing list