From 0df81552d74d2c188a9323ffe18f6ebe799b86f9 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Wed, 20 Nov 2024 14:14:43 +0100 Subject: [PATCH] sh(1): -l is only valid in cli option not as set -l --- bin/sh/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/options.c b/bin/sh/options.c index 54a9cb4c1c49..92857027843a 100644 --- a/bin/sh/options.c +++ b/bin/sh/options.c @@ -194,7 +194,7 @@ options(int cmdline) if (q == NULL || minusc != NULL) error("Bad -c option"); minusc = q; - } else if (c == 'l') { + } else if (c == 'l' && cmdline) { login = 1; } else if (c == 'o') { minus_o(*argptr, val);