-
Notifications
You must be signed in to change notification settings - Fork 1
/
plumbing
29 lines (24 loc) · 950 Bytes
/
plumbing
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# to update: cat $HOME/lib/plumbing | 9p write plumb/rules
editor = /Users/kare/bin/acme
include basic
# isbn10 search through Amazon
type is text
data matches '([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])'
plumb start open 'http://www.amazon.com/s/?field-keywords='$1
# RFC
type is text
data matches 'RFC:([0-9]+)'
plumb to web
plumb start web http://www.rfc-editor.org/rfc/rfc$1.txt
kind is text
data matches '[a-zA-Z0-9_\-./~{}@]+('$addr')?'
data matches '((/[a-zA-Z0-9_\-./]+)@[a-zA-Z0-9_\-./~{}@]+)('$addr')?'
data set $1
arg isdir $2
attr add addr=$4
plumb to gitfileedit
plumb client Gitfiles
type is text
data matches '[a-zA-Z¡-�0-9_\-./]+'
data matches '([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])[0-9a-f]*'
plumb start rc -c 'cd '''$wdir'''; root=`{git rev-parse --show-toplevel}; rev='''$1'''; {gitfileshow $rev} >[2=1] | nobs | plumb -i -d edit -a ''action=showdata filename=''$root/+$rev'