Pager icon indicating copy to clipboard operation
Pager copied to clipboard

PowerShell Pager Feature roadmap plan

Open theJasonHelmick opened this issue 4 years ago • 3 comments

Motivation

Oftentimes, the output of a command is too large to fit on a single screen. Customers need the ability to scroll forward and back through the content for readability. The PowerShell Pager is a virtual terminal pager utility implementation similar to linux equivalents more and less. The PowerShell pager is not intended to replace less, instead be an enhancement to more.

Scenerios

The PowerShell pager should support the ability to display cmdlet help similar to the parameter -ShowWindow

Help Start-Process -page

The PowerShell pager should have a cmdlet Format-Page that supports pipeline input of content.

Get-Service | Where-Object {$_.status -eq “Stopped”} | Format-Page

Version 1.0 pager features

Planned features of the initial 1.0 release of the PowerShell Pager to support page navigation.

Feature | KeyBinding

  1. Top of File | HOME
  2. Bottom of file | END
  3. Next page | SPACEBAR
  4. Previous page | b
  5. Exit | q
  6. Down one line | UP ARROW
  7. Up one line | DOWN ARROW

Planned features of Version.Next release

To support the customer in identifying specific data, search with highlight will be added to the pager. Within the paging utility, a user will be able to specify a argument to be highlighted.

Feature | KeyBinding

  1. Search forward | /
  2. Search backward | \
  3. Next forward match | f
  4. Next backward match | b

Alternative Proposals

  1. The addition of Half page navigation similar to less. Keybindings move the content 1/2 page forward or backward.

theJasonHelmick avatar Jul 31 '20 15:07 theJasonHelmick

supporting VT mouse scrolling would be a good one too

LuanVSO avatar Mar 18 '21 17:03 LuanVSO

Also, please don't forget to support page up and page down keys to scroll up / down one screen at a time. With only the arrow keys currently supported and the constant fullscreen refresh (issue #20), scrolling long documents (integrated help) is painful at the moment.

nbros avatar Mar 01 '22 13:03 nbros

I'm thinking in implementing it myself, it doesn't seem too hard. but +1 for this feature. Page Up and Page Down are essential features ! I was thinking in writing a pager myself to page the history when I press F7 in PSReadLine.

But I'm ironically using less.exe from Pscx for that now for that.

Luiz-Monad avatar Jun 10 '22 18:06 Luiz-Monad