Automatic-splatting

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
This topic is 7 years and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
adbertram
Posts: 99
Last visit: Fri Aug 18, 2017 11:31 am

Automatic-splatting

Post by adbertram »

It would be VERY convenient for me to highlight a command with parameters which would then create a hash table from them for splatting.

For example, I'd have this: Test-Path -Path C:\whatever.txt -PathType Leaf

I could highlight the line, hit a keyboard shortcut which would then turn into this:

@params = @{
'Path' = 'C:\Whatever.txt'
'PathType' = 'Leaf'
}
Test-Path @params

I do this constantly when I have a command reference that starts to get too long.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: Automatic-splatting

Post by DevinL »

We currently have this on our wishlist but I will make note that someone else would like it implemented.

Thank you for your suggestion.
DevinL
SAPIEN Technologies, Inc.
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

Re: Automatic-splatting

Post by Bosparan »

I'll cheerfully second the motion.
While probably not as often as adbertram, I sure have the occasional use-case for this (and manually converting a call that turns out too lengthy after you notice it's gone out of hand is ... tedious).
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: Automatic-splatting

Post by DevinL »

Thank you for your input Bosparan, I've noted that you also requested the feature.

Hopefully we can make this happen for the both of you before long :)
DevinL
SAPIEN Technologies, Inc.
User avatar
Qopium
Posts: 1
Last visit: Thu Apr 13, 2017 12:03 am

Re: Automatic-splatting

Post by Qopium »

DevinL wrote:Thank you for your input Bosparan, I've noted that you also requested the feature.

Hopefully we can make this happen for the both of you before long :)
Nice, I'm looking forward to this. it's great that you listen to your customers and add new features like this.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: Automatic-splatting

Post by DevinL »

Hey everyone,

Just a note that we've added this feature (or at least something similar) in our latest service build for PowerShell Studio (5.4.136).

If you right click a line such as the one in the original example, you'll see the Splat Command option, select it, and you'll have it splatted out for ya.

For more information check out DavidC's blog post: https://www.sapien.com/blog/2017/02/28/ ... -v5-4-136/
DevinL
SAPIEN Technologies, Inc.
This topic is 7 years and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked