Skip to content

Fix $__ highlighting & add $PsNativeCommand variables#3

Merged
michaelblyons merged 3 commits intomichaelblyons:refactorfrom
God-damnit-all:patch-1
Dec 27, 2025
Merged

Fix $__ highlighting & add $PsNativeCommand variables#3
michaelblyons merged 3 commits intomichaelblyons:refactorfrom
God-damnit-all:patch-1

Conversation

@God-damnit-all
Copy link
Copy Markdown

Note: This PR is targeting the refactor branch.

Because _ is considered an alphanumeric character, it is not matched by \b. This means that it can be moved into the non-capture group that is surrounded by \b. This will make it so something like $___ doesn't have the $_ portion of it turned orange and italic.

@God-damnit-all God-damnit-all changed the title Fix $__ highlighting Fix $__ highlighting & add $PsNativeCommand variables Dec 9, 2025
@God-damnit-all
Copy link
Copy Markdown
Author

Added the $PsNativeCommandArgumentPassing and $PsNativeCommandUseErrorActionPreference variables.

Also grouped the PsSession variables together.

@God-damnit-all
Copy link
Copy Markdown
Author

As an aside, the refactor messed with the type highlighting:

image

It's only highlighting the very end. Unless that's intentional...?

@michaelblyons
Copy link
Copy Markdown
Owner

Sorry for neglect! My repo watching settings were misconfigured.

The type changes are intentional. They match either Python or C# type conventions (which are similar to each other anyway). You can tweak your color scheme to color the namespace the same as the type.

Will review your PR soon.

@michaelblyons
Copy link
Copy Markdown
Owner

Can you add a regression test for the $__?

@michaelblyons michaelblyons merged commit b61d808 into michaelblyons:refactor Dec 27, 2025
3 checks passed
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.

2 participants