code: 9ferno

Download patch

ref: 4cc6d43e4ab51d2c6e59c4a7d1e7353601c8e0d4
parent: ce5b785b9891f5e8d1e2661dbe8d2578fcf2bd83
author: henesy <unknown>
date: Mon May 31 06:39:45 EDT 2021

sh builtin run now properly expands path if no ./ is supplied

--- a/appl/cmd/sh/sh.b
+++ b/appl/cmd/sh/sh.b
@@ -768,7 +768,9 @@
 		}
 
 		if (!disfile) {
-			fd = sys->open(npath += ".dis", sys->OREAD);
+			npath += ".dis";
+			sys->print("trying ⇒ %s\n", npath);
+			fd = sys->open(npath, sys->OREAD);
 			if(fd != nil){
 				return npath;
 			}
@@ -1940,8 +1942,8 @@
 	ctxt.push();
 	{
 		ctxt.setoptions(ctxt.INTERACTIVE, 0);
-		#path := pathexpand(ctxt, (hd tl args).word);
-		runscript(ctxt, (hd tl args).word, tl tl args, 1);
+		path := pathexpand(ctxt, (hd tl args).word);
+		runscript(ctxt, path, tl tl args, 1);
 		ctxt.pop();
 		return nil;
 	} exception e {