SecretManagement.LastPass icon indicating copy to clipboard operation
SecretManagement.LastPass copied to clipboard

Secret Formatter

Open itfranck opened this issue 5 years ago • 3 comments

What I'd love to get is a formatter (ps1xml) to get the Notes field multiline content expanded automatically.

Technically, all values could be expanded as only the Notes field can be multiline.

Current: image

itfranck avatar Nov 21 '20 19:11 itfranck

hmm this is tricky because since we're returning an ordereddictionary, we can't be specific enough... we'd need to return a specific type that we own.

That said... the user could just use Format-Table -Wrap yeah?

TylerLeonhardt avatar Nov 21 '20 21:11 TylerLeonhardt

I answered on the PR but Format-Table -Wrap denature the output. It make it pretty for display but you can't pipe that output anywhere. A proper formatter won't do that and will preserve the object.

As per other thread

I am now looking into $MySecret.PSObject.TypeNames.Insert(0,'LastPassSecret')

I think one of the issue I have (Never dealt with that specific before) is the Item parametrized property. I am having trouble to do something with Item at all...

That being said, investigating 5.1 PS1XML files, I found a few file dealing with formatting on KeyValuePair so I might have found the holy grail I was looking for 🤞 image

itfranck avatar Nov 21 '20 22:11 itfranck

I think you need to create a custom view to meet this requirement.

jdhitsolutions avatar Apr 21 '21 18:04 jdhitsolutions