-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed as duplicate of#25721
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bug
Description
Summary of the new feature / enhancement
Sometimes I just declare a temp variable used for nothing else other than for splatting a function call:
$p = @{a=1;b=2;c=3}
Some-Func -AdditionalParam 4 @p -AnotherParam 5However, I do this as a means of dealing with the fact that PowerShell does not have a way to do inline splatting.
I propose the following syntax:
Some-Func @:@{a=2;b=2;c=3} # Functions
& "somescript.ps1" @:@{d=4;e=5;f=6} # Script files
& $someScriptBlock @:@{g=7;h=8;i=9} # Script blocks
& $somePSObject.SomeScriptMethod.Script @:@(1,2,3,4,5) # Script methodsProposed technical implementation details (optional)
No response
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bug