shithub: rc

Download patch

ref: d9d908a45636d25da856366384d7533a4f1edb53
parent: b625d97c5a304c092faf06aada5c9b079d8a6a11
author: qwx <qwx@sciops.net>
date: Tue Apr 26 20:49:59 EDT 2022

sam fn: ^R,^W: don't do anything if mouse focuses jam.err

--- a/bin/s
+++ b/bin/s
@@ -3,6 +3,10 @@
 
 # ^R [cmd]     # run command and send output to jam.err window
 fn R{
+	if(~ $% jam.err */jam.err){
+		echo nope >[1=2]
+		exit
+	}
 	echo w
 	c=''''^($*)^''''
 	f=$%
@@ -31,6 +35,10 @@
 # from kvik's rc/rwin
 # ^W [cmd]     # open window in current file's directory
 fn W{
+	if(~ $% jam.err */jam.err){
+		echo nope >[1=2]
+		exit
+	}
 	echo w
 	echo !exec window -m -cd `{basename -d $%} $*
 }