Discussion:
rc `{find} in plumber?
(too old to reply)
Vincent Murphy
2012-09-20 08:54:38 UTC
Permalink
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?
dexen deVries
2012-09-20 11:13:28 UTC
Permalink
Post by Vincent Murphy
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

[[[↓][→]]]
Loading...