]> git.wh0rd.org Git - nano.git/commitdiff
Recognizing also header lines that use "/usr/bin/env" to call
authorBenno Schulenberg <bensberg@justemail.net>
Sun, 21 Sep 2014 15:29:40 +0000 (15:29 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Sun, 21 Sep 2014 15:29:40 +0000 (15:29 +0000)
the program, instead of just a direct call via "/bin/program".
Doing this for Shell scripts, and for Python, Perl and Ruby.
This fixes Savannah bug #43270 reported by Kitty.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5095 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
doc/syntax/perl.nanorc
doc/syntax/python.nanorc
doc/syntax/ruby.nanorc
doc/syntax/sh.nanorc

index 3edb5ffd7d1fff6e8f14802e1050939f8ffb73e8..645438eef1ddddbd45c43d69a52bc34a9a1419d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-21  Benno Schulenberg  <bensberg@justemail.net>
+       * doc/syntax/{perl,python,ruby,sh}.nanorc: Recognize also header
+       lines of the form "#!/usr/bin/env thing" besides "#!/bin/thing".
+       This fixes Savannah bug #43270 reported by Kitty.
+
 2014-08-29  Benno Schulenberg  <bensberg@justemail.net>
        * src/text.c (do_justify): Replace the old get_shortcut() wrapper
        with the new func_from_key().
index 5f39c176eb752ca437c861be56c6523ded0e4e31..6a70d3d1c16d6386f656e77f6a0cbdd35b937975 100644 (file)
@@ -1,7 +1,7 @@
 ## Here is an example for Perl.
 
 syntax "perl" "\.p[lm]$"
-header "^#!.*/perl[-0-9._]*"
+header "^#!.*perl[-0-9._]*"
 magic "Perl script text"
 
 color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
index 4679cf10e7d8eb0797c61e1e98d0baa6cd39d37a..f2ee15a24eb39ced255e5b85b53b3b1df573f0c2 100644 (file)
@@ -1,7 +1,7 @@
 ## Here is an example for Python.
 
 syntax "python" "\.py$"
-header "^#!.*/python[-0-9._]*"
+header "^#!.*python[-0-9._]*"
 
 # Function definitions.
 icolor brightblue "def [0-9A-Z_]+"
index 3566e1fea4dd50f9a474444794158644d943908d..a4ed1783e2fffc3b6aa63f9dd2923197a1a42ee1 100644 (file)
@@ -1,7 +1,7 @@
 ## Here is an example for Ruby.
 
 syntax "ruby" "\.rb$"
-header "^#!.*/ruby[-0-9._]*"
+header "^#!.*ruby[-0-9._]*"
 
 # Asciibetical list of reserved words.
 color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
index 823cc5d1951e4df890a5d9898814b1e4126b12fd..36b049fce46e15657292c06ec69534591119a9bd 100644 (file)
@@ -1,7 +1,7 @@
 ## Here is an example for Bourne shell scripts.
 
 syntax "sh" "\.sh$"
-header "^#!.*/(ba|k|pdk)?sh[-0-9_]*"
+header "^#!.*(ba|k|pdk)?sh[-0-9_]*"
 magic "(POSIX|Bourne.*) shell script text"
 
 icolor brightgreen "^[0-9A-Z_]+\(\)"