From a07853cd9387f1749252a4a0a0cf9375bf53cf46 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 6 May 2023 00:17:13 -0500 Subject: [PATCH] toysh command line parsing should stop at first nonoption argument. --- toys/pending/sh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/pending/sh.c b/toys/pending/sh.c index b1a5d1a0..ff29c11d 100644 --- a/toys/pending/sh.c +++ b/toys/pending/sh.c @@ -58,7 +58,7 @@ USE_SH(OLDTOY(., source, TOYFLAG_NOFORK)) USE_SH(NEWTOY(unset, "fvn[!fv]", TOYFLAG_NOFORK)) USE_SH(NEWTOY(wait, "n", TOYFLAG_NOFORK)) -USE_SH(NEWTOY(sh, "0(noediting)(noprofile)(norc)sc:i", TOYFLAG_BIN)) +USE_SH(NEWTOY(sh, "0^(noediting)(noprofile)(norc)sc:i", TOYFLAG_BIN)) USE_SH(OLDTOY(toysh, sh, TOYFLAG_BIN)) USE_SH(OLDTOY(bash, sh, TOYFLAG_BIN)) // Login lies in argv[0], so add some aliases to catch that -- 2.39.2