From d53521a631166ba67cc2c4e039a2ffaefc10ae2d Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 22 Apr 2024 10:29:02 +0200 Subject: [PATCH] syntax: sh: recognize more shells than `sh` on a shebang line for busybox Also, elide an unneeded pair of parentheses. Original-patch-by: Sertonix https://lists.gnu.org/archive/html/nano-devel/2024-04/msg00026.html --- syntax/sh.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/sh.nanorc b/syntax/sh.nanorc index bf15d44a..cebea36e 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 "^#!.*/((env[[:blank:]]+)?((a|ba|c|da|k|mk|pdk|tc|z)?sh)|busybox[[:blank:]]+sh|openrc-run|runscript)\>" +header "^#!.*/(((env|busybox)[[:blank:]]+)?(a|ba|c|da|k|mk|pdk|tc|z)?sh|openrc-run|runscript)\>" header "-\*-.*shell-script.*-\*-" magic "(POSIX|Bourne-Again) shell script.*text" comment "#"