-
Notifications
You must be signed in to change notification settings - Fork 677
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
Update ps1con prompt #1497
Update ps1con prompt #1497
Conversation
Does this work with remote sessions? There have been a few changes related to that recently, specifically adding the space before |
The current unit tests do pass, however I will check and add new tests. The idea was to support a prompt which does not contain a path. I would be OK with adding the space back in if necessary. |
Ok -- I'm mostly interested in a test for this, as I can't tell you if the space should be there or not, but if someone ever touches that that piece again, there should be a test which makes sure that today's command line don't break. |
For reference, the default prompt is I will write some tests. This is my first time contributing to this project - could you link me to a good example test to model after? |
Yes :) Take a look here: https://github.com/pygments/pygments/blob/master/tests/test_shell.py#L172 -- there's also a special formatter ( |
Thanks, looks good! |
Manually merged via a57edec. Thanks for your contribution! |
This change allows a more flexible PowerShell session prompt. The prompt now must start with
PS
and end with>
but the inner contents are not important. This allow simpler prompts such asPS>
which are more useful in documentation and more comparable to the Bash$
.Also adding documentation showing examples of how to use the prompts for each supported shell session. This was very difficult to look up previously, as one simply had to know the magic combination of characters that would be parsed as a prompt.
As a result of adding this doc, this change also updates the github action to use the current version of pygments to render the docs. Otherwise it would technically be installing whatever latest version is on pypi/cached, which might not match the master branch. In that case this updated languages doc would render incorrectly.