mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-02 23:54:26 +03:00
tweaks: remove some ineffectual parts from header-line regexes
Adding "[abc]*" does not restrict the recognized header line in any way. Also, improve the header-line regex for shell scripts, because it should not match "barunscript" (for example).
This commit is contained in:
parent
93c8e316a8
commit
c524fbe6d0
@ -1,7 +1,7 @@
|
|||||||
## Here is an example for Perl.
|
## Here is an example for Perl.
|
||||||
|
|
||||||
syntax perl "\.p[lm]$"
|
syntax perl "\.p[lm]$"
|
||||||
header "^#!.*perl[-0-9._]*"
|
header "^#!.*perl"
|
||||||
magic "Perl script"
|
magic "Perl script"
|
||||||
comment "#"
|
comment "#"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## Here is an example for Python.
|
## Here is an example for Python.
|
||||||
|
|
||||||
syntax python "\.py$"
|
syntax python "\.py$"
|
||||||
header "^#!.*python[-0-9._]*"
|
header "^#!.*python"
|
||||||
magic "Python script"
|
magic "Python script"
|
||||||
linter pyflakes
|
linter pyflakes
|
||||||
comment "#"
|
comment "#"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## Here is an example for Ruby.
|
## Here is an example for Ruby.
|
||||||
|
|
||||||
syntax ruby "\.rb$"
|
syntax ruby "\.rb$"
|
||||||
header "^#!.*ruby[-0-9._]*"
|
header "^#!.*ruby"
|
||||||
magic "Ruby script"
|
magic "Ruby script"
|
||||||
linter ruby -w -c
|
linter ruby -w -c
|
||||||
comment "#"
|
comment "#"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## Here is an example for Bourne shell scripts.
|
## Here is an example for Bourne shell scripts.
|
||||||
|
|
||||||
syntax sh "(\.sh|\.(a|ba|c|da|k|mk|pdk|tc|z)(sh|shrc|sh_profile)|/(etc/|\.)profile)$"
|
syntax sh "(\.sh|\.(a|ba|c|da|k|mk|pdk|tc|z)(sh|shrc|sh_profile)|/(etc/|\.)profile)$"
|
||||||
header "^#!.*(a|ba|c|da|k|mk|pdk|tc|z)?(sh[-0-9_]*|openrc-run|runscript)"
|
header "^#!.*/(((a|ba|c|da|k|mk|pdk|tc|z)?sh)|openrc-run|runscript)"
|
||||||
magic "(POSIX|Bourne-Again) shell script.*text"
|
magic "(POSIX|Bourne-Again) shell script.*text"
|
||||||
linter dash -n
|
linter dash -n
|
||||||
comment "#"
|
comment "#"
|
||||||
|
Loading…
Reference in New Issue
Block a user