From 944d87915a191af442b3895ef5af89ffb65789d8 Mon Sep 17 00:00:00 2001 From: Evan Silberman Date: Mon, 11 Nov 2024 11:24:21 -0800 Subject: [PATCH] Recognize "oksh" executable name as ksh A portable version of OpenBSD's ksh is distributed with the executable name oksh [1]. It's a descendant of pdksh and can be shellchecked as ksh. [1]: https://github.com/ibara/oksh --- src/ShellCheck/Data.hs | 1 + src/ShellCheck/Parser.hs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ShellCheck/Data.hs b/src/ShellCheck/Data.hs index 3000a9954..a145684ef 100644 --- a/src/ShellCheck/Data.hs +++ b/src/ShellCheck/Data.hs @@ -167,6 +167,7 @@ shellForExecutable name = "ksh" -> return Ksh "ksh88" -> return Ksh "ksh93" -> return Ksh + "oksh" -> return Ksh _ -> Nothing flagsForRead = "sreu:n:N:i:p:a:t:" diff --git a/src/ShellCheck/Parser.hs b/src/ShellCheck/Parser.hs index 66d62ffc9..3986dab75 100644 --- a/src/ShellCheck/Parser.hs +++ b/src/ShellCheck/Parser.hs @@ -3387,7 +3387,8 @@ readScriptFile sourced = do "busybox sh", "bash", "bats", - "ksh" + "ksh", + "oksh" ] badShells = [ "awk",