code: plan9front

Download patch

ref: 005bd2b7e10b0084f74d1af3f9523551348b31d9
parent: 8759403bdb867b564b8ec4f2ee130034f7ebc582
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Jun 4 10:27:41 EDT 2024

sam: M: don't require a current file to operate (thanks umbraticus)

--- a/sys/src/cmd/sam/xec.c
+++ b/sys/src/cmd/sam/xec.c
@@ -26,7 +26,7 @@
 	if(f && f->unread)
 		load(f);
 	if(f==0 && (cp->addr==0 || cp->addr->type!='"') &&
-	    !utfrune("bBnqUXY!^", cp->cmdc) &&
+	    !utfrune("bBnqUXY!^M", cp->cmdc) &&
 	    cp->cmdc!=('c'|0x100) && !(cp->cmdc=='D' && cp->ctext))
 		error(Enofile);
 	i = lookup(cp->cmdc);