Commits

Georg Brandl  committed e586a49

Closes #862: better guess for shell lexer.

  • Participants
  • Parent commits d1aebb4

Comments (0)

Files changed (1)

File pygments/lexers/shell.py

     }
 
     def analyse_text(text):
-        return shebang_matches(text, r'(ba|z|)sh')
+        if shebang_matches(text, r'(ba|z|)sh'):
+            return 1
+        if text.startswith('$ '):
+            return 0.2
 
 
 class BashSessionLexer(Lexer):