# echo /n/pi?
fs trixie
Edit B /n/pi1 /n/pi2 /n/pi3 /n/pi4 /n/pi5 /n/pi6 /n/pi7 /n/remote
# Edit X!/n/[^/]+/$! >fs `{dircpu} &
# Edit X!/n/[^/]+/$! >diskutil unmount force $%
Edit X!Errors! >echo delete | 9p write acme/$winid/ctl &
Edit X!/n/[^/]+/$! >ssh -O check `{dircpu} &
Edit X!/n/[^/]+/$! >ssh -fNMT `{dircpu} &
Edit X!/n/[^/]+/$! >x uptime &
Edit X!/n/[^/]+/$! >x cat /sys/firmware/devicetree/base/model &
Edit X!/n/[^/]+/$! >x vcgencmd get_config total_mem &
Edit X!/n/[^/]+/$! >x ip addr &
Edit X!/n/[^/]+/$! >x df -h / &
Edit X!Errors! >x sudo apt update &
Edit X!Errors! >x sudo apt upgrade -y &
Edit X!/n/[^/]+/$! >x uname -a &
Edit X!Errors! ,g/aarch64/ >echo delete | 9p write acme/$winid/ctl &
Edit X!Errors! ,v/armv6l/ >echo delete | 9p write acme/$winid/ctl &
# echo Edit B /n/*/boot/firmware/cmdline.txt
for $home/lib/plumbing:
╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍ ✃ ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍
# remote absolute path dir names go to editor
type is text
data matches '(/[.a-zA-Z¡-0-9_/+\-]*[a-zA-Z¡-0-9_/+\!\-])'
wdir matches '(.*/n/[^/]+)(/.*)?'
arg isdir $1/$data
data set $dir
plumb to edit
plumb client $editor
# remote absolute path file names, possibly tagged by line number, go to editor
type is text
wdir matches '(.*/n/[^/]+)(/.*)?'
data matches '(/[.a-zA-Z¡-0-9_/+\-]*[a-zA-Z¡-0-9_/+\!\-])('$addr')?'
attr add addr=$3
data set $1
wdir matches '(.*/n/[^/]+)(/.*)?'
arg isfile $1/$data
data set $file
plumb to edit
plumb client $editor
# NOTE: the effect of 'data set' and 'attr add' of a partially matched rule (above) persists through the rest of the rules!
#
# From the plumb(7) manpage:
# "Such rewritings are permanent, so rules that specify them should
# be placed after all pattern-matching rules in the rule set."
#
# yrk: I haven't found a way to avoid that, as I need to capture
# context from both 'data matches' and 'wdir matches' for the 'arg isfile' there.
╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍ ✃ ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍
|