incorrect recognition of bash builtins

Issue #1125 duplicate
Sam Mason created an issue

Pygments uses the \b regex to recognise when keywords end, this isn't consistent with how the shell parses words. For example a hypothetical script called kill-jobs is parsed incorrectly:


I.e. it's highlighted as if the kill builtin is run with -jobs as a parameter.

I'd change the lexer to refer to something more restrictive than a regex word-boundary, but I'm not sure what would be better—the few things I've thought of would bulk out the source significantly.

Comments (4)

  1. Log in to comment