Skip to content

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

Merged
merged 7 commits into from
Aug 11, 2020

Conversation

adityapatwardhan
Copy link
Member

@adityapatwardhan adityapatwardhan commented Aug 7, 2020

PR Summary

The PR uses Microsoft.PowerShell.Pager nuget package to add paging support to Get-Help.
To see output of Get-Help on alternate screen buffer, use -Paged switch.

PR Context

PR Checklist

Comment on lines +667 to +670
// 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;
Copy link
Collaborator

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?

Copy link
Member Author

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.

Copy link
Collaborator

@vexx32 vexx32 Aug 10, 2020

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.

Copy link
Collaborator

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

Copy link
Collaborator

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? 🙂

Copy link
Member Author

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.

@daxian-dbw daxian-dbw requested review from JamesWTruher and removed request for daxian-dbw August 8, 2020 18:36
@daxian-dbw
Copy link
Member

@JamesWTruher Can you please review this PR?

Comment on lines +667 to +670
// 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;
Copy link
Collaborator

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

@adityapatwardhan
Copy link
Member Author

@daxian-dbw Is this ready to merge?

@daxian-dbw
Copy link
Member

@adityapatwardhan I notice there is still an open comment thread: #13374 (comment). I'm waiting for that to be resolved.

@adityapatwardhan
Copy link
Member Author

@daxian-dbw I have opened an issue to discuss making Pager more general purpose. #13405

@daxian-dbw daxian-dbw merged commit 485ec44 into PowerShell:master Aug 11, 2020
@daxian-dbw daxian-dbw added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Aug 11, 2020
@daxian-dbw daxian-dbw added this to the 7.1.0-preview.6 milestone Aug 11, 2020
@adityapatwardhan adityapatwardhan deleted the gethelppaged branch August 11, 2020 23:43
@ghost
Copy link

ghost commented Aug 17, 2020

🎉v7.1.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

@joeyaiello joeyaiello assigned daxian-dbw and unassigned daxian-dbw Aug 19, 2020
adityapatwardhan added a commit to adityapatwardhan/PowerShell that referenced this pull request Aug 25, 2020
@adityapatwardhan
Copy link
Member Author

#13519 reverts this change

TravisEz13 added a commit that referenced this pull request Sep 2, 2020
…13374)" (#13519)

Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
@ghost
Copy link

ghost commented Sep 8, 2020

🎉v7.1.0-preview.7 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants