-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Add paging support to Get-Help
#13374
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
Conversation
// The output from GetHelpOutput has all the item in the output. | ||
// We just need to store it and then write to Pager later. | ||
// No need to append them. | ||
_multiItemPagerBuffer = helpText; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design question about Pager - is it a common use case? If so should it be the Pager feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have had a discussion about it. We would like to get some feedback from the community if they see value in making this a built in function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do. Out-Host -Paging is significantly less useful. Having a native pager in PS would let folks utilize it regardless of the host OS and what external paging utils may or may not be available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it relies on the alternate character buffer, then it has reduced applicability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you expand on that a bit for those of us not intimately familiar with the APIs in play here? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened issue #13405 to discuss if the Pager should be made more general purpose. Lets continue discussion over there.
@JamesWTruher Can you please review this PR? |
// The output from GetHelpOutput has all the item in the output. | ||
// We just need to store it and then write to Pager later. | ||
// No need to append them. | ||
_multiItemPagerBuffer = helpText; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it relies on the alternate character buffer, then it has reduced applicability
Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>
@daxian-dbw Is this ready to merge? |
@adityapatwardhan I notice there is still an open comment thread: #13374 (comment). I'm waiting for that to be resolved. |
@daxian-dbw I have opened an issue to discuss making Pager more general purpose. #13405 |
🎉 Handy links: |
…owerShell#13374)" This reverts commit 485ec44.
#13519 reverts this change |
🎉 Handy links: |
PR Summary
The PR uses
Microsoft.PowerShell.Pager
nuget package to add paging support toGet-Help
.To see output of
Get-Help
on alternate screen buffer, use-Paged
switch.PR Context
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.-Paged
parameter ofGet-Help
MicrosoftDocs/PowerShell-Docs#6448