Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console lexer (BashSessionLexer) description lacks detail #1599

Closed
j1elo opened this issue Nov 11, 2020 · 2 comments
Closed

console lexer (BashSessionLexer) description lacks detail #1599

j1elo opened this issue Nov 11, 2020 · 2 comments
Milestone

Comments

@j1elo
Copy link

@j1elo j1elo commented Nov 11, 2020

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:

#1598 (comment)

the console lexer 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 CHANGES

The # 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.

@birkenfeld
Copy link
Contributor

@birkenfeld birkenfeld commented Nov 11, 2020

Thanks, this is a very good point.

Loading

@Anteru Anteru added this to the 2.7.3 milestone Nov 11, 2020
@j1elo
Copy link
Author

@j1elo j1elo commented Nov 11, 2020

Quite terse, but already much better than before. Thanks!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants