Skip to content

Add -RepeatHeader to Format-Table to enable repeating header for each screen full #8481

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

Merged
merged 7 commits into from
Dec 20, 2018

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Dec 18, 2018

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 -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.

gifv

Fix #8455

PR Checklist

@SteveL-MSFT
Copy link
Member Author

SteveL-MSFT commented Dec 18, 2018

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.

@SteveL-MSFT SteveL-MSFT force-pushed the format-table-header branch 2 times, most recently from 1073566 to 38c5f8e Compare December 18, 2018 05:47
@daxian-dbw daxian-dbw merged commit 110f78b into PowerShell:master Dec 20, 2018
@iSazonov iSazonov added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Jan 17, 2019
@SteveL-MSFT SteveL-MSFT deleted the format-table-header branch June 6, 2020 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-Engine Indicates that a PR should be marked as an engine change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable repeating table headers with Format-Table
4 participants