Skip to content

(shell) Period not match as part of promt #4244

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

Open
ianw opened this issue Apr 24, 2025 · 0 comments
Open

(shell) Period not match as part of promt #4244

ianw opened this issue Apr 24, 2025 · 0 comments
Labels
bug help welcome Could use help from community language

Comments

@ianw
Copy link

ianw commented Apr 24, 2025

A period in the prompt name is not matched by the shell highlighter, e.g.

aprompt $ ls -l  # matches
a-prompt $ ls -l # matches
a.prompt $ ls -l # no match

It matches other special characters such as ~[]- so I think . is a reasonable addition. I noticed this when writing some documentation that had a branch-name in the prompt, so foo-1 was working but foo-1.0 wasn't.

@ianw ianw added bug help welcome Could use help from community language labels Apr 24, 2025
ianw added a commit to ianw/highlight.js that referenced this issue Apr 24, 2025
Allow a "." to match in the prompt section of shell/console examples.
ianw added a commit to ianw/highlight.js that referenced this issue Apr 28, 2025
Allow a "." to match in the prompt section of shell/console examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community language
Projects
None yet
Development

No branches or pull requests

1 participant