blob: 74c1f306248f940da4f0aaff5054270170f8a8dc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# pardes's plumbing rules, in plumb(6)'s language: a plumbing file of
# your own names this one as `include basic`. A message (plumb/send) is
# matched against the rule sets in order; the first whose patterns all
# hold takes it, and its actions say where it goes: a port pardes reads
# itself (edit: a file or directory opened as Look opens one; web: the
# host's browser; a loaded kind by its name, `image`, `pdf`), another
# port a program reads, or a word or command started.
# urls go to the web browser (the host's: xdg-open, open on macOS)
type is text
data matches 'https?://.*'
plumb to web
# existing directories, and existing files at the place written after
# them, go to the editor; a file a kind shows (a picture, a PDF) to
# that kind
type is text
arg isdir $data
plumb to edit
type is text
arg isfile $data
plumb to edit
|