diff options
Diffstat (limited to 'core/fs-help.txt')
| -rw-r--r-- | core/fs-help.txt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/core/fs-help.txt b/core/fs-help.txt new file mode 100644 index 00000000..76ad7c5e --- /dev/null +++ b/core/fs-help.txt @@ -0,0 +1,45 @@ +Pardes virtual filesystem +========================= +README this summary; the pardes book's Scripting and Reference chapters have the rest +index a line per pane: serial kind(text|term|cmd|pdf|image|an addon's) dirty name column; names hold blanks: rsplit(maxsplit=1) +status pid, version and pane count +look write a line: a right click on it at the pane with the keyboard; read: the serials it touched (this open's) +exec write a line: a middle click, a builtin or a shell line; read the same (every exec file) +pager write a directory: its one +Pager, made or emptied; read the same open: its serial (pardes -) +log events: new del rename save newcol delcol run exit send ask answer changed dump restore restored restoredcol msg err +screen the rendered screen as JSON, frozen from open to close +listeners the session's dial addresses +sessions the pardes daemon's, as pardes ps lists them: daemon <pid>; session <pid> tty|gui attached|detached <name> (attached: it has a frontend of its own); client <pid> for each of its clients; shell <pid>; orphan <pid> +focus the serial of the pane with the keyboard (empty on a column tag); write one to give it the keyboard +kbdin write runes: keys typed at the pane with the keyboard, done before the write answers (\x1b Esc, \n Enter) +mousein write `m col row buttons` (1 left, 2 middle, 4 right): the mouse as it now is; m 10 5 4, m 10 5 0 is a right click +ctl settings a line; or Newcol, Dump [export f], Restore [label|f], Exit (refuses once over unsaved panes), Kill [w], size C R +commands every builtin: word, arg, root|pane|both (the ctl that takes it), -- what it does; addons: the kinds of pane here +recent files opened lately, closed ones too: open|closed <path> +dumps the dumps the state file keeps, the newest first: <label> <date> <size> <panes> +layout a line per column: serial index x width current|notcurrent empty|full pane-serials; then active <serial> +tag the workspace tag, tagexec a word as a click in it; col/<serial>/ a column's tag, ctl, exec; rmdir: empty only +plumb/ rules: the plumber's rules, plumb(6)'s (a write adds rule sets, > replaces); send: write a message, six lines then data; <port>: read the messages sent to it +pane/new open it to make a pane (<session dir>/+New) in the active column; the read answers its serial +pane/<n>/ name body tag ctl addr dot limit data xdata sel dirty mark scroll errors event look exec tagexec rows; rmdir closes + rows: a line a row, kind (m c p; d decl, u unmarked) line col end_line end_col source_column location_end code_start styles path; styles - or N:start+len=role,... (keyword string number comment, add del emph line, joined by .); a write at 0 replaces + on terminals pty/data (keys in, output out), pty/status, pty/ctl (winsize, sig, exec), pty/run (a line, its exit and output) +os/, src/ the host filesystem; the editor's own sources +$m below: $PARDES_MOUNT (set under 9ns --mntgen); without it, 9p -a "unix!$PARDES_9P". + cat $m/index which panes exist + n=$(cat $m/pane/new) make a pane of your own (each open makes one), take its serial + exec 3<>$m/pane/$n/look; echo /etc/hosts:3 >&3; cat <&3 open a file through it, see the pane it went to + printf 'text\n' >> $m/pane/$n/body append to it (> replaces it all) + echo 'Msg hello' > $m/pane/$n/exec show text in the editor + echo 'Edit ,x/foo/c/bar/' > $m/pane/$n/ctl sam's Edit, one undo step; an x that matches nothing succeeds + echo /re/ > $m/pane/$n/addr; printf new > $m/pane/$n/data replace the next match + exec 3<>$m/log; echo follow >&3; cat <&3 what happened lately, then wait for more + exec 3<>$m/pane/$n/pty/run; echo make >&3; cat <&3 exit N, then the output + +Traps: + A refused write says only EINVAL or EIO; grep '^err' log | tail -1 says why (not the last line, maybe +Unsaved's new). + Root look and exec act at the pane with the keyboard, which another client may own: use a pane's own look and exec. + addr is the pane's and moves on: each /re/ searches from the last, a data write leaves it past the text. + Through a mount, printf 'a\nb\n' arrives a line a write: send a block with one write, ending in a newline. + Pane words (Save Undo Del) go to pane/<n>/ctl, settings and session words to /ctl. + Exit, Restore, Del and get refuse once over unsaved text; the same word again discards. |
