1
1

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.
Этот коммит содержится в:
Benno Schulenberg 2020-09-27 19:35:27 +02:00
родитель 17f531890a
Коммит 7c698a9c3a

Просмотреть файл

@ -2,6 +2,7 @@
syntax sh "(\.sh|(\.|/)(a|ba|c|da|k|mk|pdk|tc|z)sh(rc|_profile)?|/(etc/|\.)profile)$" 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 "^#!.*/(((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" magic "(POSIX|Bourne-Again) shell script.*text"
comment "#" comment "#"