PowerShell icon indicating copy to clipboard operation
PowerShell copied to clipboard

Toolbox for scripters for common patterns

Open powercode opened this issue 9 years ago • 6 comments

I would like to see classes shipping with PowerShell geared towards scripters implementing advanced functions.

With common patterns I mean path processing, with or w/o globbing, Include/Exclude filtering, Progress management (percent complete/seconds remaining), creation of error records etc.

All these things that we write over and over again.

powercode avatar Nov 19 '16 02:11 powercode

You're right - it's a lot of boiler plate crap that is a PITA to have to write. I've added snippets for some of this (primarily path processing) to the PowerShell extension for VSCode. It seems like path processing is so common that there would be a specific PathParameterAttribute that would move all the grungy boiler plate code into PowerShell and provide your script's [string] or [string[]] parameter with all the properly resolved (tested for existence if the path must exist) and error appropriately (like when a "must exist" path doesn't exist). Ah, I can dream. :-)

rkeithhill avatar Nov 19 '16 05:11 rkeithhill

Wow, this issue really attracted a lot of attention :)

Is it better to open multiple issues with more specific suggestions?

powercode avatar Dec 06 '16 20:12 powercode

Yeah, I'd say more specific issues would help drive something forwards.

lzybkr avatar Dec 06 '16 21:12 lzybkr

What would be a good namespace for such tools? SMA.Util? SMA.Common? SMA.SDK?

powercode avatar Dec 06 '16 21:12 powercode

Similar issue #6745

ThomasNieto avatar Aug 18 '23 15:08 ThomasNieto

This issue has not had any activity in 6 months, if there is no further activity in 7 days, the issue will be closed automatically.

Activity in this case refers only to comments on the issue. If the issue is closed and you are the author, you can re-open the issue using the button below. Please add more information to be considered during retriage. If you are not the author but the issue is impacting you after it has been closed, please submit a new issue with updated details and a link to this issue and the original.

Ping to keep alive

powercode avatar Mar 22 '24 13:03 powercode