syntax: sh: recognize shebangs with any shell after 'env', not just 'sh'

(Inspired by a complaint seen somewhere on Stackoverflow.)
master
Benno Schulenberg 2020-12-25 16:47:49 +01:00
parent 1878168ae3
commit 6a3ba2ab50
1 changed files with 1 additions and 1 deletions

View File

@ -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 "#"