diff options
author | Georg Brandl <georg@python.org> | 2014-01-09 17:14:07 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-01-09 17:14:07 +0100 |
commit | 2140f455b5b59d7e29d520c27b6eb9d2db30d006 (patch) | |
tree | bc48c372a71d661f361c6945e82738edcc113a76 /pygments/lexers/shell.py | |
parent | 846195f0fb24e724a611d601494fa5056936b5bc (diff) | |
parent | 8f1d30b59f7720cf99ed508ac720eb7126161e2b (diff) | |
download | pygments-2140f455b5b59d7e29d520c27b6eb9d2db30d006.tar.gz |
Merged in rwtolbert/pygments-main (pull request #238)
Added lexer for new Hy language, a variant of Lisp running under Python
Diffstat (limited to 'pygments/lexers/shell.py')
-rw-r--r-- | pygments/lexers/shell.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index 5ec9deaa..8a50d970 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -47,8 +47,8 @@ class BashLexer(RegexLexer): ], 'basic': [ (r'\b(if|fi|else|while|do|done|for|then|return|function|case|' - r'select|continue|until|esac|elif)\s*\b', - Keyword), + r'select|continue|until|esac|elif)(\s*)\b', + bygroups(Keyword, Text)), (r'\b(alias|bg|bind|break|builtin|caller|cd|command|compgen|' r'complete|declare|dirs|disown|echo|enable|eval|exec|exit|' r'export|false|fc|fg|getopts|hash|help|history|jobs|kill|let|' @@ -228,9 +228,9 @@ class BatchLexer(RegexLexer): # like %~$VAR:zlt (r'%%?[~$:\w]+%?', Name.Variable), (r'::.*', Comment), # Technically :: only works at BOL - (r'(set)(\s+)(\w+)', bygroups(Keyword, Text, Name.Variable)), - (r'(call)(\s+)(:\w+)', bygroups(Keyword, Text, Name.Label)), - (r'(goto)(\s+)(\w+)', bygroups(Keyword, Text, Name.Label)), + (r'\b(set)(\s+)(\w+)', bygroups(Keyword, Text, Name.Variable)), + (r'\b(call)(\s+)(:\w+)', bygroups(Keyword, Text, Name.Label)), + (r'\b(goto)(\s+)(\w+)', bygroups(Keyword, Text, Name.Label)), (r'\b(set|call|echo|on|off|endlocal|for|do|goto|if|pause|' r'setlocal|shift|errorlevel|exist|defined|cmdextversion|' r'errorlevel|else|cd|md|del|deltree|cls|choice)\b', Keyword), |