Giter Site home page Giter Site logo

pager's Introduction

logo PowerShell

Welcome to the PowerShell GitHub Community! PowerShell is a cross-platform (Windows, Linux, and macOS) automation and configuration tool/framework that works well with your existing tools and is optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. It includes a command-line shell, an associated scripting language, and a framework for processing cmdlets.

Windows PowerShell vs. PowerShell 7+

Although this repository started as a fork of the Windows PowerShell codebase, changes made in this repository are not ported back to Windows PowerShell 5.1. This also means that issues tracked here are only for PowerShell 7.x and higher. Windows PowerShell specific issues should be reported with the Feedback Hub app, by choosing "Apps > PowerShell" in the category.

New to PowerShell?

If you are new to PowerShell and want to learn more, we recommend reviewing the getting started documentation.

Get PowerShell

PowerShell is supported on Windows, macOS, and a variety of Linux platforms. For more information, see Installing PowerShell.

Upgrading PowerShell

For best results when upgrading, you should use the same install method you used when you first installed PowerShell. The update method is different for each platform and install method.

Community Dashboard

Dashboard with visualizations for community contributions and project status using PowerShell, Azure, and PowerBI.

For more information on how and why we built this dashboard, check out this blog post.

Discussions

GitHub Discussions is a feature to enable free and open discussions within the community for topics that are not related to code, unlike issues.

This is an experiment we are trying in our repositories, to see if it helps move discussions out of issues so that issues remain actionable by the team or members of the community. There should be no expectation that PowerShell team members are regular participants in these discussions. Individual PowerShell team members may choose to participate in discussions, but the expectation is that community members help drive discussions so that team members can focus on issues.

Create or join a discussion.

Chat

Want to chat with other members of the PowerShell community?

There are dozens of topic-specific channels on our community-driven PowerShell Virtual User Group, which you can join on:

Building the Repository

Linux Windows macOS
Instructions Instructions Instructions

If you have any problems building, consult the developer FAQ.

Build status of nightly builds

Azure CI (Windows) Azure CI (Linux) Azure CI (macOS) CodeFactor Grade
windows-nightly-image linux-nightly-image macOS-nightly-image cf-image

Downloading the Source Code

You can clone the repository:

git clone https://github.com/PowerShell/PowerShell.git

For more information, see working with the PowerShell repository.

Developing and Contributing

Please look into the Contribution Guide to know how to develop and contribute. If you are developing .NET Core C# applications targeting PowerShell Core, check out our FAQ to learn more about the PowerShell SDK NuGet package.

Also, make sure to check out our PowerShell-RFC repository for request-for-comments (RFC) documents to submit and give comments on proposed and future designs.

Support

For support, see the Support Section.

Legal and Licensing

PowerShell is licensed under the MIT license.

Windows Docker Files and Images

License: By requesting and using the Container OS Image for Windows containers, you acknowledge, understand, and consent to the Supplemental License Terms available on Microsoft Artifact Registry.

Telemetry

Please visit our about_Telemetry topic to read details about telemetry gathered by PowerShell.

Governance

The governance policy for the PowerShell project is described the PowerShell Governance document.

Please see our Code of Conduct before participating in this project.

For any security issues, please see our Security Policy.

pager's People

Contributors

adityapatwardhan avatar sethvs avatar stevel-msft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pager's Issues

PowerShell Pager Feature roadmap plan

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.

Support Key Rebinding

Synopsis

As a daily terminal user, I have developed my own preferences for how to interact with my tools. Being a vim user, I tend to gravitate towards that style. As such, for programs like a pager, I have grown accustomed to using vim-esque bindings in programs such as less, bat, and k9s just to name a few I use daily that support key bindings that fit my style either out of the box, or with configuration. I am sure countless other examples exist.

This issue is a feature request to allow the user to set their preferred bindings for controls in Pager. This will aid in not only user-friendliness and adoption, but also user accessibility as those with limited mobility can configure Pager to match their abilities.

Features Requested

Either of the following would be acceptable but I am also open to other ideas. These could be implemented as environment variables, configuration file(s), or a mix of the two.

  • User-defined control schemes that override any of the bound keys in Pager
  • A set of pre-configured schemes that ship as part of Pager that the user can choose from

Dynamic help pager breaks scrolling in original view buffer

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

N/A

Screenshot

This shows the interactions. Where my mouse isn't moving, I'm using my mouse wheel to scroll up and down.

PowerShell.2022-01-31.16-28-46.mp4

Environment data

PS Version: 7.2.1
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.2.1-rc1
PSReadLine EditMode: Windows
OS: 10.0.22000.1 (WinBuild.160101.0800)
BufferWidth: 148
BufferHeight: 48

Steps to reproduce

  1. Run a command that causes a scrollbar in your terminal e.g., Windows Terminal. Like dir -recurse $env:TEMP.
  2. Confirm that you can scroll up and down with your mouse, scrollbar, etc.
  3. Run dir and press F1.
  4. Press Q to quit.
  5. Try to scroll like you did for step 2.

Expected behavior

I can scroll up and down as before.

Actual behavior

No scrolling or scrollbar. There also appear to be scrollbar-like buttons in the main buffer that do nothing. It's almost as if the main buffer was clear except for the current view port, an alternate buffer was created, then destroyed to show the original but only the displayed buffer was restored.

FWIW, I can create an alternate buffer, write to it, and restore the original via ANSI sequences without this behavior:

&{
  write-host "`e[?1049hHello, world!"
  sleep -seconds 1
  write-host "`e[?1049l"
}

Even with this little script, I noticed that the main scroll buffer was not modified. Seems perhaps the main buffer is modified before using a alternate buffer, or maybe no alternate buffer is used (which was mentioned in release notes for dynamic help) - at least, not using ANSI sequences.

Cmder/ConEmu: Screen not correctly restored

I am currently using:

PowerShell 7.2.1
PSReadLine 2.2.2 (with PredictionViewStyle ListView, if it matters)
Cmder 1.3.19
oh-my-posh 7.23.0 (if it matters)

I can use the F1 shortcut to get the paged help and everything works as it should until I quit the pager with Q.

Then I am returned to a cleared screen.

There seems to be some unwanted interaction between Pager and ConEmu.

I tested in other terminals besides Cmder:
ConEmu => same result (no wonder as Cmder is basically ConEmu+)
Plain console host (pwsh) => works as expected
Windows Terminal => works as expected

Any idea what is going on and if it can be fixed by Pager or ConEmu?

flickering when scrolling

when scrolling the text flickers, the whole buffer goes blank and is repainted. it's especially noticeable when trying to scroll up when the buffer is already at the top of the file.
vlcsnap-2021-06-28-03h32m04s056

Administrator_.PowerShell.2021-06-28.03-35-16.mp4

Support space to page down on dynamic help viewer

Prerequisites

  • Write a descriptive title.

Description of the new feature/enhancement

The new dynamic help is nice - pressing F1 on a cmdlet or parameter - but I am used to pressing space on the keyboard to page down like with the more command help is piped to.

Proposed technical implementation details (optional)

Please either page through pipe, or support space for the new pager for dynamic help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.