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

Add support for PowerShell Remoting sessions #1398

Merged
merged 5 commits into from Jun 30, 2020
Merged

Add support for PowerShell Remoting sessions #1398

merged 5 commits into from Jun 30, 2020

Conversation

Anthirian
Copy link
Contributor

@Anthirian Anthirian commented Feb 22, 2020

I have added support for PowerShell Remoting (also called WinRM) sessions to the PowerShellSessionLexer. These follow the format below.

[Hostname]: PS C:\> Get-ChildItem

I have added this by adding an optional non-capturing group to the regex in front of the traditional regex. I hope this follows all the rules and that I did not miss an edge case.

@Anteru
Copy link
Collaborator

Anteru commented Feb 22, 2020

Could you please add a test case for this? You can generate one using the unittest formatter, but I'd feel better about it with at least some basic test added.

@Anteru Anteru self-assigned this Feb 22, 2020
@Anthirian
Copy link
Contributor Author

Anthirian commented Feb 28, 2020 via email

@Anthirian
Copy link
Contributor Author

I have added the test case you requested. Please check to see if it makes sense to test it this way (I'm fairly new to unit testing).

pygments/lexers/shell.py Show resolved Hide resolved
tests/test_shell.py Show resolved Hide resolved
@Anteru Anteru added this to the 2.7 milestone Jun 30, 2020
@Anteru Anteru merged commit b5577a6 into pygments:master Jun 30, 2020
@Anteru
Copy link
Collaborator

Anteru commented Jun 30, 2020

Merged, thanks!

@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label Jun 30, 2020
@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants