sbang support: add node-js and fix lua

This adds sbang hook support for node-js and fixes the sbang filter
for lua (the character class exclusion was swallowing newlines and
reporting a false positive if lua was mentioned anywhere in the 
file).
This commit is contained in:
healther
2017-08-18 20:57:52 +02:00
committed by scheibelp
parent 6d155833c5
commit d6d2dff324
2 changed files with 10 additions and 1 deletions

View File

@@ -104,6 +104,8 @@ lines=0
while read line && ((lines < 2)) ; do
if [[ "$line" = '#!'* ]]; then
interpreter="${line#\#!}"
elif [[ "$line" = '//!'*node* ]]; then
interpreter="${line#//!}"
elif [[ "$line" = '--!'*lua* ]]; then
interpreter="${line#--!}"
fi