Santiago Squarzon
Santiago Squarzon
This would be great to have as a public API I think, for the time being, with [ClassExplorer](https://github.com/SeeminglyScience/ClassExplorer/) this can be obtained very easily: ```ps $wp = [WildcardPattern]::new('foo*bar*.ext') $member =...
After a chat with @SeeminglyScience, for PowerShell functions, the issue seem to happen on: https://github.com/PowerShell/PowerShell/blob/e453c006d39a2fa57a903df2d0ea33ddd0cb43dd/src/System.Management.Automation/engine/ArgumentTypeConverterAttribute.cs#L138 I understand changing this line to use `CultureInfo.CurrentCulture` could cause issues, so this can be...
You can update the PSVariable instance, the same way you can update any other reference type: ```powershell $foo = 1 $refOfFoo = Get-Variable foo Start-ThreadJob { ($using:refOfFoo).Value = 2 }...
Hi @jlnrrg thanks for opening this issue, I'm aware of it but I'm not sure if there is a way around it. This is a consequence of using a [`Stack`](https://github.com/santisq/PSTree/blob/main/PSTree/public/Get-PSTree.ps1#L103)...
> Now that you've rewritten in C#, shouldn't it be easy to sort it ascending by default now? I'm guessing here but wondered if you thought about it. The link...
Hi @AKrasheninnikov, thanks for submitting the issue, it's a fair request. Would you like to contribute to updating the readme and documentation for the cmdlet? It's worth noting this issue...
@Agazoth In case you're looking for a workaround, [`Compress-ZipArchive`](https://github.com/santisq/PSCompression/blob/main/docs/en-US/Compress-ZipArchive.md) shouldn't have this problem 😉
> This can be fixed here: https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs#L6882 by changing it from `completionText = $"'{memberName}'";` to `completionText = $"'{memberName.Replace("'", "''")}'";` which is how it's done in other places. Though like in...
Well, main reason is for what you mentioned in the last comment: > Though like in those other places it won't work if the member name contains special single quote...
> Would something like this work? > > ```cs > var completion Text = (memberName.IndexOfAny(s_charactersRequiringQuotes) != 0) > ? $"'{EscapeSingleQuotedStringContent(memberName)'" > : memberName; > if (isMethod && addMethodParenthesis) > {...