commit 7c698a9c3a2ae2135223f873a143e894b1a71134
parent 17f531890a1ebe85ed1ffbf1c97ebaf5ce8b3fd7
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 27 Sep 2020 19:35:27 +0200
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.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/syntax/sh.nanorc b/syntax/sh.nanorc
@@ -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 "#"