Commits

Georg Brandl committed cf60bd3

#469: use bash lexer for .ksh scripts.

Comments (0)

Files changed (2)

pygments/lexers/_mapping.py

     'AsymptoteLexer': ('pygments.lexers.other', 'Asymptote', ('asy', 'asymptote'), ('*.asy',), ('text/x-asymptote',)),
     'BBCodeLexer': ('pygments.lexers.text', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)),
     'BaseMakefileLexer': ('pygments.lexers.text', 'Makefile', ('basemake',), (), ()),
-    'BashLexer': ('pygments.lexers.other', 'Bash', ('bash', 'sh'), ('*.sh', '*.ebuild', '*.eclass'), ('application/x-sh', 'application/x-shellscript')),
+    'BashLexer': ('pygments.lexers.other', 'Bash', ('bash', 'sh', 'ksh'), ('*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass'), ('application/x-sh', 'application/x-shellscript')),
     'BashSessionLexer': ('pygments.lexers.other', 'Bash Session', ('console',), ('*.sh-session',), ('application/x-shell-session',)),
     'BatchLexer': ('pygments.lexers.other', 'Batchfile', ('bat',), ('*.bat', '*.cmd'), ('application/x-dos-batch',)),
     'BefungeLexer': ('pygments.lexers.other', 'Befunge', ('befunge',), ('*.befunge',), ('application/x-befunge',)),

pygments/lexers/other.py

 
 class BashLexer(RegexLexer):
     """
-    Lexer for (ba)sh shell scripts.
+    Lexer for (ba|k|)sh shell scripts.
 
     *New in Pygments 0.6.*
     """
 
     name = 'Bash'
-    aliases = ['bash', 'sh']
-    filenames = ['*.sh', '*.ebuild', '*.eclass']
+    aliases = ['bash', 'sh', 'ksh']
+    filenames = ['*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass']
     mimetypes = ['application/x-sh', 'application/x-shellscript']
 
     tokens = {