-
Notifications
You must be signed in to change notification settings - Fork 768
Description
After reporting an issue with the console lexer seemingly wrong behavior with single quotes in comment sections (#1598) it turns out the issue was just a matter of misuse.
I believe this is a documentation bug in the sense that the current description in the user docs ("Lexer for simplistic shell sessions", BashSessionLexer) is not even trying to convey the most basic concept of intended usage and explanation of the behavior.
Even something simple such as the example given in the other issue would already be a big improvement:
the
consolelexer is meant for cases where you include shell prompt, command and output, e.g.# ls -l total 128 -rw-r--r-- 1 gbr gbr 8816 Oct 24 21:54 AUTHORS -rw-r--r-- 1 gbr gbr 40808 Oct 24 21:54 CHANGESThe
#at the start of a line here is recognized as a common prompt (for the root user), not as a comment sign.If you're presenting pure shell code, you should use one of the shell lexers, usually
bash.