[Openmcl-devel] External Programs and Piping

Ron Garret ron at flownet.com
Wed Dec 31 16:46:23 PST 2014


Try using bashlink, which is part of ergolib:

https://github.com/rongarret/ergolib

(bash "man -t ls | open -f -a /Applications/Preview.app/“)

works for me, as does:

(join (bash “man ls”) #\newline)

at least when you run CCL at the command prompt.  It doesn’t work in the IDE, probably because the output of MAN has some funky embedded TTY controls in it that the IDE doesn’t know how to deal with.

rg

On Dec 31, 2014, at 4:13 PM, Steven Núñez <steven.nunez at inference.sg> wrote:

> Greeting everyone,
>  
> I’m trying to implement a system that will display manpages to the user from the REPL. There’s a neat trick to convince Preview to do this here:
>  
>               http://www.devopsderek.com/blog/2013/03/10/view-man-pages-with-preview-on-mac-os-x/
>  
> But I can’t seem to hit upon the right incantation to make this work from the CCL REPL. As a work-around / substitute I tried:
>  
>               (run-program "/usr/bin/man" '("ls") :output *standard-output*)
>  
> Which put the text of the man page in the REPL’s terminal windows, but the manpage formatting is lost and it comes out as one big string of text. Efforts to pipe it to /usr/bin/less have failed. Seem piping, if working, isn’t obvious.
>  
> Does anyone have any ideas?
>  
> Happy New Year,
>  
> -          SteveN
>  
>  
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20141231/28a0d8ce/attachment.htm>


More information about the Openmcl-devel mailing list