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.
Locked
User avatar
adbertram
Posts: 99
Joined: Sun Mar 03, 2013 12:45 pm
Location: Indiana
Contact:

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
Site Admin
Posts: 1098
Joined: Mon Aug 17, 2015 2:25 pm

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: 284
Joined: Sun Mar 03, 2013 12:45 pm

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
Site Admin
Posts: 1098
Joined: Mon Aug 17, 2015 2:25 pm

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
Joined: Fri Aug 05, 2016 4:22 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
Site Admin
Posts: 1098
Joined: Mon Aug 17, 2015 2:25 pm

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.

Locked