From 972d70075cd7a384e44803dc64c073375e57ca48 Mon Sep 17 00:00:00 2001 From: Trevor Joynson Date: Sun, 22 Oct 2017 16:45:29 -0700 Subject: [PATCH] Allow for /usr/bin/env shebangs (#71) --- lexers/bash.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lexers/bash.go b/lexers/bash.go index acd0f0c..4a418cd 100644 --- a/lexers/bash.go +++ b/lexers/bash.go @@ -6,7 +6,7 @@ import ( . "github.com/alecthomas/chroma" // nolint ) -var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:bash|zsh|sh|ksh)`) +var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:env |)(?:bash|zsh|sh|ksh)`) // Bash lexer. var Bash = Register(MustNewLexer(