* [9fans] rc `{find} in plumber?
@ 2012-09-20 8:54 Vincent Murphy
2012-09-20 11:13 ` dexen deVries
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Murphy @ 2012-09-20 8:54 UTC (permalink / raw)
To: 9fans
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9fans] rc `{find} in plumber?
2012-09-20 8:54 [9fans] rc `{find} in plumber? Vincent Murphy
@ 2012-09-20 11:13 ` dexen deVries
0 siblings, 0 replies; 2+ messages in thread
From: dexen deVries @ 2012-09-20 11:13 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Thursday 20 of September 2012 08:54:38 Vincent Murphy wrote:
> 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.
perhaps two rules: first one has `find | plumb SECOND_RULE' as its target, the
other performs the actual action.
--
dexen deVries
[[[↓][→]]]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-20 11:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-20 8:54 [9fans] rc `{find} in plumber? Vincent Murphy
2012-09-20 11:13 ` dexen deVries
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).