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

Missing shell keyword in #1652

jmd-dk opened this issue Dec 29, 2020 · 1 comment

Missing shell keyword in #1652

jmd-dk opened this issue Dec 29, 2020 · 1 comment


Copy link

@jmd-dk jmd-dk commented Dec 29, 2020

The shell lexer does not include the in keyword. In particular, the BashLexer class contains the following basic tokens:


which does not include in. Thus Bash code like

for i in 1 2 3; do
    echo $i

is not lexed and formatted correctly with respect to in (unlike the rendering above as done by GitHub).

This is easily fixed by just adding in to the list of tokens. I believe the in keyword is not present for any of the shell lexers in lexers/, though I do not know which of the non-Bash shells also supports this keyword.

@Anteru Anteru closed this in d7dcc6d Dec 29, 2020
Copy link

@Anteru Anteru commented Dec 29, 2020

Thanks, good catch! As far as I can tell, it's in PowerShell already, it's not in TCSH, but it's a keyword in Bash/ZSH/KSH, so I added it to the BashLexer only.

@Anteru Anteru added this to the 2.7.4 milestone Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants