From 452cad6b05922d44e057c8f05c69dc0bc7f68d19 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 25 Dec 2020 16:47:49 +0100
Subject: [PATCH 10/11] syntax: sh: recognize shebangs with any shell after
 'env', not just 'sh'

(Inspired by a complaint seen somewhere on Stackoverflow.)
---
 syntax/sh.nanorc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/syntax/sh.nanorc b/syntax/sh.nanorc
index 773a87d1..00e9670e 100644
--- a/syntax/sh.nanorc
+++ b/syntax/sh.nanorc
@@ -1,7 +1,7 @@
 ## Syntax highlighting for Bourne shell scripts.
 
 syntax sh "(\.sh|(\.|/)(a|ba|c|da|k|mk|pdk|tc|z)sh(rc|_profile)?|/(etc/|\.)profile)$"
-header "^#!.*/(((a|ba|c|da|k|mk|pdk|tc|z)?sh)|(busybox|env) +sh|openrc-run|runscript)"
+header "^#!.*/((env\s+)?((a|ba|c|da|k|mk|pdk|tc|z)?sh)|busybox\s+sh|openrc-run|runscript)\>"
 header "-\*-.*shell-script.*-\*-"
 magic "(POSIX|Bourne-Again) shell script.*text"
 comment "#"
-- 
2.29.2

