Patrick Meinecke

Results 430 comments of Patrick Meinecke

This is pretty much the first thing people (including myself) try to do with aliases. I've seen countless threads/discord conversations with a ton of folks tripping on this. I'm tempted...

@rjmholt I don't think the parser would need to change. Just the parameter binder and possibly a new `CommandInfo` (or alternatively, just some different code in `AliasInfo.Parameters`). Well I say...

> Really? The first thing you do is to do complex aliasing? I'm pretty sure the first alias I tried to make way back when was to `ipconfig /all`. I...

I do think a change here would in the long run be an overall positive change, and I'd like to see it personally. I'm not sure what you could actually...

> * _thread-terminating_ is technically clearer The full phrase "the current thread of execution" is unfortunately sorta needed there as it doesn't actually terminate the thread (in 99.99% of cases)....

> Perhaps the better approach is to give up the quest for a more accurate term, given that the official one should be the friendly "script-terminating", and that with the...

I've found myself wanting this a lot as well, but every time I go to request it I have a hard time justifying it. The only real reason you'd want...

> It would be best/easiest/most consistent to allow you to add a scriptblock using the `PowerShell` API which would look like: I worry that adding a `ScriptBlock` overload would result...

Side note, there is sort of a way to do this without reflection. This is the pattern I usually end up with: ```csharp // From cmdlet parameters or similar ScriptBlock...

> @rjmholt, wouldn't introducing the following new `ScriptBlock.InvokeWithContext()` overload address your use case? It may not matter in every use case, but it's worth noting that the `Invoke*` methods have...