patch-data_elvis_arf 612 B

1234567891011121314151617
  1. $OpenBSD: patch-data_elvis_arf,v 1.1 2012/05/05 14:03:15 sthen Exp $
  2. Make file/syntax detection work for scripts that use env
  3. in their shebang line. From Debian.
  4. --- data/elvis.arf.orig Tue Oct 21 04:32:25 2003
  5. +++ data/elvis.arf Sat May 5 13:40:29 2012
  6. @@ -10,6 +10,8 @@ then {
  7. if os=="unix" && buflines >= 1
  8. then {
  9. try 1s/\V^#! *[^ ]*\/\([^ ]\+\).*/set! bufdisplay="syntax \1"/x
  10. + if bufdisplay=="syntax env"
  11. + then try 1s/\V^#! *[^ ]*\/[^ ]\+ \([^ ]\+\).*/set! bufdisplay="syntax \1"/x
  12. if bufdisplay<<11=="syntax perl"
  13. then set! bufdisplay="syntax perl"
  14. if bufdisplay<<12=="syntax tclsh"