|
|
|
Created:
14 years ago by robkroeger Modified:
13 years, 2 months ago Reviewers:
CC:
rsc, codebot Visibility:
Public. |
Patch Set 1 #Patch Set 2 : revised patch, per comments #Total messages: 10
|
robkroeger
|
14 years ago (2011年12月15日 12:57:52 UTC) #1 |
This patch adds a plumb: url helper scheme to plumb.app so that links of the form of plumb://open?url=/tmp/foo.txt in a html page would request the plumber to open foo.txt. Please have a look.
It seems like there is a lot of unnecessary syntax here (open, url, file://). Is there a reason for the generality as compared with, say, plumb:/tmp/foo.txt?action=edit
On 2011年12月15日 15:35:12, rsc wrote: > It seems like there is a lot of unnecessary syntax here > (open, url, file://). Is there a reason for the generality > as compared with, say, plumb:/tmp/foo.txt?action=edit My goal was to re-use tools that I had found from a time when I was exploring TextMate so I took the URL scheme from there (http://manual.macromates.com/en/using_textmate_from_terminal#url_scheme_html). It seemed easier to write one slightly more complicated plumber rule and replace txtmt: with plumb: in script output instead of needing to understand someone else's code for html generation. The objective C code delivers the entire url so I'm perfectly happy to write a simpler example scheme for plumb/base and keep my (theoretically effort-reducing) more complicated rule in a personal plumbing rule if that would be more lgtm-able. Please advise. Rob.
For now let's just do plumb:<thing> means run 'plumb -d edit thing'. The script in Plumb.app should handle the case instead of having to do it in the plumb rules. Russ
PTAL. Simpler patch usually means better patch. :-)
Please take another look at the revised change.
On 2012年02月08日 11:44:34, robkroeger wrote: > Please take another look at the revised change. Hi Russ, I think this CL got lost in the shuffle. Could you maybe take a look?
*** Submitted as http://code.google.com/p/plan9port/source/detail?r=64a908db98f0 *** plumb.app: accept plumb:foo as alias for foo R=rsc CC=plan9port.codebot http://codereview.appspot.com/5495046 Committer: Russ Cox <rsc@swtch.com>