xref: /inferno-os/usr/inferno/lib/plumbing (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
1*46439007SCharles.Forsyth# these are in order from most specific to least,
2*46439007SCharles.Forsyth# since first rule that fires wins.
3*46439007SCharles.Forsyth
4*46439007SCharles.Forsyth# image files go to wm/view
5*46439007SCharles.Forsythkind is text
6*46439007SCharles.Forsythdata matches '[a-zA-Z0-9_\-./]+'
7*46439007SCharles.Forsythdata matches '([a-zA-Z0-9_\-./]+)\.(jpg|jpeg|gif|bit|png)'
8*46439007SCharles.Forsythdata isfile     $0
9*46439007SCharles.Forsythplumb to view
10*46439007SCharles.Forsythplumb start /dis/wm/view.dis -i $file
11*46439007SCharles.Forsyth
12*46439007SCharles.Forsyth# sounds go to auplay
13*46439007SCharles.Forsythkind is text
14*46439007SCharles.Forsythdata matches '[a-zA-Z0-9_\-./]+'
15*46439007SCharles.Forsythdata matches '([a-zA-Z0-9_\-./]+)\.(iaf|wav)'
16*46439007SCharles.Forsythdata isfile     $0
17*46439007SCharles.Forsythplumb alwaysstart auplay
18*46439007SCharles.Forsythplumb start /dis/auplay.dis $file
19*46439007SCharles.Forsyth
20*46439007SCharles.Forsyth# URLs go to wm/charon
21*46439007SCharles.Forsythkind is text
22*46439007SCharles.Forsythdata matches '(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@]+([.:][a-zA-Z0-9_@]+)*/?[a-zA-Z0-9_?#~&/\-]+([:.][a-zA-Z0-9_?#~&/\-]+)*'
23*46439007SCharles.Forsythplumb to web
24*46439007SCharles.Forsythplumb start /dis/charon.dis $0
25*46439007SCharles.Forsyth
26*46439007SCharles.Forsyth# file URLs go to wm/charon
27*46439007SCharles.Forsythkind is text
28*46439007SCharles.Forsythdata matches '[a-zA-Z0-9_/\-]+\.html?'
29*46439007SCharles.Forsythdata isfile $0
30*46439007SCharles.Forsythdata set file://localhost$file
31*46439007SCharles.Forsythplumb to web
32*46439007SCharles.Forsythplumb start /dis/charon.dis $data
33*46439007SCharles.Forsyth
34*46439007SCharles.Forsyth# .m files are looked up in /module and passed to wm/brutus
35*46439007SCharles.Forsythkind is text
36*46439007SCharles.Forsythdata matches '([a-zA-Z0-9]+\.m)(:[0-9]+)?'
37*46439007SCharles.Forsythdata isfile     /module/$1
38*46439007SCharles.Forsythdata set        /module/$0
39*46439007SCharles.Forsythplumb to edit
40*46439007SCharles.Forsythplumb start /dis/wm/brutus.dis $file$2
41*46439007SCharles.Forsyth
42*46439007SCharles.Forsyth# existing files, possibly tagged by line number, go to wm/brutus
43*46439007SCharles.Forsythkind is text
44*46439007SCharles.Forsythdata matches '([.a-zA-Z0-9_/\-]+[a-zA-Z0-9_/\-])(:[0-9]+)?'
45*46439007SCharles.Forsythdata isfile     $1
46*46439007SCharles.Forsythplumb to edit
47*46439007SCharles.Forsythplumb start /dis/wm/brutus.dis $file$2
48*46439007SCharles.Forsyth
49*46439007SCharles.Forsyth# existing files go to brutus
50*46439007SCharles.Forsythkind is text
51*46439007SCharles.Forsythdata matches '[a-zA-Z0-9_./\-]+'
52*46439007SCharles.Forsythdata isdir      $0
53*46439007SCharles.Forsythplumb alwaysstart dir # nasty plumbing hack
54*46439007SCharles.Forsythplumb start /dis/wm/dir.dis $dir
55*46439007SCharles.Forsyth
56*46439007SCharles.Forsyth# man pages
57*46439007SCharles.Forsythkind is text
58*46439007SCharles.Forsythdata matches '([a-zA-Z\-]+)\(([0-9]+)\)'
59*46439007SCharles.Forsythplumb alwaysstart man # nasty plumbing hack
60*46439007SCharles.Forsythplumb start /dis/wm/man.dis $2 $1
61