From: a@9srv.net
To: 9fans@9fans.net
Subject: [9fans] web plumbing on OS X drawterm
Date: Wed, 16 Jul 2008 02:11:34 -0400 [thread overview]
Message-ID: <389246c56d6a78a742491c7538382d3d@9srv.net> (raw)
OS X has this command 'open', which I'm told exists or is
available on other unixes. It's about as close as you get to
'plumb' when in foreign lands. You call it like 'open
http://9fans.net' or 'open /etc/passwd' and it does more
or less what you'd expect, finding (usually) the right app.
I mostly get to my Plan 9 cpu servers via drawterm from
my OS X laptop these days (9vx soon, once I get a
comfortable environment there). I have a script that
calls drawterm with the right arguments. I just added
this to the script:
mkfifo /tmp/open.fifo
while () {open `{cat open.fifo}}
I also have a srcipt on the Plan 9 side, 'web':
#!/bin/rc
fifoname=/mnt/term/tmp/open.fifo
if (test -e $fifoname)
echo $* > $fifoname
if not
lynx2txt $*
(for those unfamiliar, lynx2txt is like wurl2txt, but using
fgb's lynx port instead of hget to get things like tables).
So now 'web http://9fans.net' on my Plan 9 box opens up
a Safari window. Stick that in a plumbing rule and I can
now click on urls in my drawterm'd acme and have a
Safari window come up.
It's pretty nice, and took all of about two minutes. Maybe
useful for others.
Anthony
next reply other threads:[~2008-07-16 6:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 6:11 a [this message]
2008-07-16 12:57 ` Russ Cox
2008-07-16 13:06 ` a
2008-07-16 14:08 ` Skip Tavakkolian
2008-07-16 18:19 ` Antonin Vecera
2008-07-16 19:00 ` Skip Tavakkolian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=389246c56d6a78a742491c7538382d3d@9srv.net \
--to=a@9srv.net \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).