shithub: rc

Download patch

ref: a3bcc11ddec06f173669f02e3c6b6fb290957196
parent: cd5075873d4b1e9e8634b62cb4145dbd8030cf5f
author: qwx <qwx@sciops.net>
date: Wed Mar 9 20:29:47 EST 2022

add s: sam functions

--- /dev/null
+++ b/bin/s
@@ -1,0 +1,15 @@
+#!/bin/rc
+# sam functions
+
+# from kvik's rc/rwin
+# ^W [cmd]: open window in current file's directory
+fn W{
+	echo !exec window -m -cd `{basename -d $%} $*
+}
+
+# ^b [cmd]: run command and send output to jam.err window
+fn b{
+	echo B /tmp/jam.err
+	{ cd `{basename -d $%} && $* } >[1=2]
+	echo e
+}