9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Vincent Murphy <vdm@vdm.ie>
To: 9fans@9fans.net
Subject: [9fans] rc `{find} in plumber?
Date: Thu, 20 Sep 2012 08:54:38 +0000	[thread overview]
Message-ID: <e8ac86a6-423a-447f-a19e-979f43be8bca@googlegroups.com> (raw)

I am trying to build a plumb rule where $wdir is searched for a filename (after a miss in $wdir), so I don't have to use find or xplor explicitly. This is similar to the 'Go to File' or 'Cmd-T' command from Textmate, commonly ported to other editors.

I was hoping to say something like files=`{find $wdir | g $data}, or mentions=`{g $data} for a miss on window body text, and then use $files in the action, e.g. if 1 result, load the file, if >1 results, show the list of results in a new window. However it would appear that plumb variables are processed by bespoke code in src/cmd/plumb/rules.c and not by rc. I would also like to make these commands ignore files as specified in .hgignore and similar.

Is there a way to load rc output in to a plumb variable? Or is there a better approach to achieve this?



             reply	other threads:[~2012-09-20  8:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-20  8:54 Vincent Murphy [this message]
2012-09-20 11:13 ` dexen deVries

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=e8ac86a6-423a-447f-a19e-979f43be8bca@googlegroups.com \
    --to=vdm@vdm.ie \
    --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).