dfinke / PowerShellHumanizer

PowerShell Humanizer wraps Humanizer: meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities
Apache License 2.0
121 stars 18 forks source link

Surface more options on casing #8

Closed dfinke closed 8 years ago

dfinke commented 8 years ago

"CanReturnTitleCase".Humanize(LetterCasing.Title) => "Can Return Title Case"

"Can_return_title_Case".Humanize(LetterCasing.Title) => "Can Return Title Case"

"CanReturnLowerCase".Humanize(LetterCasing.LowerCase) => "can return lower case"

"CanHumanizeIntoUpperCase".Humanize(LetterCasing.AllCaps) => "CAN HUMANIZE INTO UPPER CASE"

dfinke commented 8 years ago

@cdhunt

Implemented the LetterCasing.Title. Wondering about the best way to extended Get-Command to include this?

image

cdhunt commented 8 years ago

Add a script property to System.Management.Automation.CmdletInfo. I'm not sure if there's much value in humanizing aliases. Most are just acronyms.

dfinke commented 8 years ago

Cool, good point. Add the property in the ps1xml?

cdhunt commented 8 years ago

I think to do it property, we'd create a new custom property, either through Update-Type or a Type XML file, and then create a Format XML to display the new property. This goes back to #5 and refactoring how the custom types are managed.

cdhunt commented 8 years ago

Now supports all of the casing options for Humanize as well as the Transform. Added a Humanized parameter to CmdletInfo and FunctionInfo types.