Add -RepeatHeader to Format-Table to enable repeating header for each screen full - #8481
Merged
Dongbo Wang (daxian-dbw) merged 7 commits intoDec 20, 2018
Conversation
Steve Lee (SteveL-MSFT)
requested review from
Paul Higinbotham (PaulHigin) and
Travis Plunk (TravisEz13)
December 18, 2018 01:13
Steve Lee (SteveL-MSFT)
requested review from
Bruce Payette (BrucePay) and
Dongbo Wang (daxian-dbw)
as code owners
December 18, 2018 01:13
9 tasks
Steve Lee (SteveL-MSFT)
force-pushed
the
format-table-header
branch
from
December 18, 2018 01:57
4b4f8b3 to
efe8124
Compare
Member
Author
|
The remaining codefactor issues are not related to this PR or I'm adopting the current conventions in the source code for consistency but breaks CodeFactor rules. |
Steve Lee (SteveL-MSFT)
force-pushed
the
format-table-header
branch
2 times, most recently
from
December 18, 2018 05:47
1073566 to
38c5f8e
Compare
Steve Lee (SteveL-MSFT)
force-pushed
the
format-table-header
branch
from
December 18, 2018 06:41
38c5f8e to
3fc6463
Compare
Paul Higinbotham (PaulHigin)
suggested changes
Dec 18, 2018
Dongbo Wang (daxian-dbw)
requested changes
Dec 19, 2018
Paul Higinbotham (PaulHigin)
approved these changes
Dec 19, 2018
Propose a different way to organize the code
Dongbo Wang (daxian-dbw)
approved these changes
Dec 19, 2018
11 tasks
Thatgfsj (Thatgfsj)
pushed a commit
to Thatgfsj/PowerShell
that referenced
this pull request
Aug 6, 2026
…each screen full (PowerShell#8481) When using a screen reader or just getting the output of a table with lots of rows, the header is no longer on the screen and the columns may no longer make sense without the context. This change adds a `-RepeatHeader` switch to `Format-Table` to enable re-outputting the header after every screen full (minus 1 row). Expectation is that the user is piping the output to a pager (e.g. less) which uses the bottom row for pager information. I followed the `AutoSize` parameter as the way to get the parameter from the cmdlet into the deep formatting object where it's needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
When using a screen reader or just getting the output of a table with lots of rows, the header is no longer on the screen and the columns may no longer make sense without the context. This PR adds a
-RepeatHeaderswitch toFormat-Tableto enable re-outputting the header after every screen full (minus 1 row). Expectation is that the user is piping the output to a pager (e.g. less) which uses the bottom row for pager information. I followed theAutoSizeparameter as the way to get the parameter from the cmdlet into the deep formatting object where it's needed.Fix #8455
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.-RepeatHeaderswitch forFormat-TableMicrosoftDocs/PowerShell-Docs#3443[feature]if the change is significant or affects feature tests