Closed KirkMunro closed 9 years ago
This was a bug (a shortcoming really) in the original design. I was adding a __FormatData PSNoteProperty to the objects that were being output, and that property would appear in several situations, one of which is when you have an object without a default display property set that you pass to ft -auto. For example, a simple test is this:
$x = [pscustomobject]@{one=1;two=2} $x | ft -auto
The second command would output a table with properties one, two, and FormatData. This is undesirable so I went poking around and found out that properties of type PSNoteProperty can be hidden from the output when using an internal field, so I updated how FormatData is created/added to the objects that go through FormatPx so that FormatData is automatically hidden. The end result is that the formatting information is hidden from the property output when using a Format-* command as well as from Get-Member output. The property is still there though, and you can see it in .PSObject.Properties['FormatData']. This is a nicer solution, so I released this in a new build. Update to version 1.0.2.3 or later to get this fix.
Reported from direct email:
When using this Get-Phonetic function, __FormatData is outputted:
PS [4]: 'jOIHU56%%3##kdj?=4/' | Get-Phonetic
Input text: jOIHU56%%3##kdj?=4/
Expected or bug?