Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting: Format-Table et al need to handle -Property #71

Closed
jazzdelightsme opened this issue Feb 8, 2019 · 1 comment
Closed

Formatting: Format-Table et al need to handle -Property #71

jazzdelightsme opened this issue Feb 8, 2019 · 1 comment
Assignees

Comments

@jazzdelightsme
Copy link
Member

jazzdelightsme commented Feb 8, 2019

Repro Steps: (abstract)

  1. Gather some objects which have view definitions registered with the alternate formatting engine.
  2. Attempt to Format-Blah them, explicitly requesting certain properties ("$stuff | ft Name, DumpPath")

Expected results:
Something sensible. Ideally we can just generate an alt-formatting view definition on the fly and use that.

Actual results:
The already-registered view definition is used, ignoring the request for certain properties.

Concrete example:

$stuff = dir C:\temp\dumps\ -File | ForEach-DbgDumpFile {
   $thing = lm ntdll
   $thing | Format-List | Out-Null
   Write-Output $thing
}

# BUG: We get the default module table view here, not Name and DumpPath
$stuff | ft Name, DumpPath

Workarounds:
To get the desired properties with the alternate formatting engine, use the alternate formatting cmdlets directly (like "$stuff | fat Name, DumpPath").

To use the standard formatting engine, use the module-qualified name of the formatting cmdlets (like "$stuff | Microsoft.PowerShell.Utility\Format-Table Name, DumpPath").

@jazzdelightsme
Copy link
Member Author

Fixed this in #84 (commit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant