syntax: sh: recognize some shell scripts by their Emacs modeline

This helps with recognizing most files in /usr/share/bash*/completions/,
where --magic is powerless.
This commit is contained in:
Benno Schulenberg 2020-09-27 19:35:27 +02:00
parent 17f531890a
commit 7c698a9c3a
1 changed files with 1 additions and 0 deletions

View File

@ -2,6 +2,7 @@
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 "-\*-.*shell-script.*-\*-"
magic "(POSIX|Bourne-Again) shell script.*text"
comment "#"