summaryrefslogtreecommitdiff
path: root/src/plumbing
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 02:31:20 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commitf749eb712d990a9b03f1db372d5311e77bd32edd (patch)
treeee4d9966f1eb293054b7ed865c9d4d6eb49e432b /src/plumbing
parent8f6621f9f70db86d56266a59b56dfb92b324b0d9 (diff)
parentb3d32656413734952bc918c2d4cfd12fede6c214 (diff)
downloadpardes-f749eb712d990a9b03f1db372d5311e77bd32edd.tar.gz
pardes-f749eb712d990a9b03f1db372d5311e77bd32edd.zip
integration: the terminal behind src/Term.zig, with the diff viewer and the plumber's first phase
A merge of term-phase0 and pardes-next. File.zig's recolorSyntax keeps the theme's grounds and names Term.Filter and Term.Span; the changelog keeps both sides' entries, the palette sentence in the place of the entry the terminal work cut down. core-test 985/985 on tui; the diff, pager and tree process cases pass, goldens unchanged. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/plumbing')
-rw-r--r--src/plumbing23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/plumbing b/src/plumbing
new file mode 100644
index 00000000..74c1f306
--- /dev/null
+++ b/src/plumbing
@@ -0,0 +1,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