syntax: sh: recognize more shells than sh on a shebang line for busybox
Also, elide an unneeded pair of parentheses. Original-patch-by: Sertonix <sertonix@posteo.net> https://lists.gnu.org/archive/html/nano-devel/2024-04/msg00026.html
This commit is contained in:
@@ -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 "#"
|
||||
|
||||
Reference in New Issue
Block a user