Skip to content

More function should support pipelining #1267

Closed

Description

@lzybkr

The current definition of more does not pipeline, it collects all output in $input and then pipes to more after the upstream command finishes.

Activity

  1. vors commented on Jul 2, 2016

    @vors
    Collaborator

    It's a duplicate of #559

    Ideally, we should implement it for 0.7.0 milestone, so we have some time for stabilization.
    I see this issue as one of the major usability blockers.

  2. added this to the v0.7.0 milestone on Jul 3, 2016
  3. self-assigned this
    on Jul 3, 2016
  4. lzybkr commented on Jul 3, 2016

    @lzybkr
    ContributorAuthor

    It's related, but not a dupe. The implementation of the more function needs to change, it doesn't stream even when not calling native commands, e.g.

    & { 1..100; sleep -seconds 10; 101..200 } | more
    

    You'll see no output for 10 seconds.

  5. vors commented on Jul 3, 2016

    @vors
    Collaborator

    Still don't understand why it's different. More calls internally native pager.

    # Respect PAGER, use more on Windows, and use less on Linux
    if (Test-Path env:PAGER) {
      $moreCommand = (Get-Command -CommandType Application $env:PAGER).Definition | Select-Object -First 1
    } elseif ($IsWindows) {
      $moreCommand = (Get-Command -CommandType Application more).Definition | Select-Object -First 1
    } else {
      $moreCommand = (Get-Command -CommandType Application less).Definition | Select-Object -First 1
    }
  6. lzybkr commented on Jul 3, 2016

    @lzybkr
    ContributorAuthor

    If you used an internal pager (which more doesn't allow for, but should), a fix to the native command processor wouldn't help.

    The more function doesn't have a process block, so $input is collected until it's done, then the end block is called.

  7. vors commented on Jul 3, 2016

    @vors
    Collaborator

    What is this internal pager? Do we use it anywhere?

  8. lzybkr commented on Jul 3, 2016

    @lzybkr
    ContributorAuthor

    out-host -paging - it's bad, nobody uses it. But if I wanted to write a cmdlet to page, more should call it somehow, not sure if it should be via $env:PAGER or not (probably not, external tools use that same env var).

  9. vors commented on Jul 3, 2016

    @vors
    Collaborator

    As far as I see, if we fix #559 then we will also have a problem with out-host -paging, but we can ignore it, because nobody uses it.

  10. vors commented on Jul 3, 2016

    @vors
    Collaborator

    I'm playing around with NativeCommandProcessor.cs.
    What's the right label for "work in progress"? Is it 3 -Working?

  11. lzybkr commented on Jul 3, 2016

    @lzybkr
    ContributorAuthor

    I take 3 - Working to mean the assignee is working on it.
    As for 2 - Ready - to me that means more or less up for grabs, design not really an issue, or design is resolved.

  12. removed their assignment
    on Jul 30, 2016
  13. joeyaiello commented on Sep 2, 2016

    @joeyaiello
    Contributor

    Jason Shirk (@lzybkr) per our conversation with the @PowerShell/powershell-maintainers, would this actually be something that goes to 0 - Backlog? And if so, what's the intended purpose of 2 - Ready?

  14. modified the milestones: , post-6.0.0 on Mar 4, 2017
  15. iSazonov commented on Jan 18, 2018

    @iSazonov
    Collaborator

    Jason Shirk (@lzybkr) I attached a script file to address the Issue. Could you please look when you'll have free time? If it is right direction I'll push a PR.
    Next-More.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usabilityWG-Interactive-Consolethe console experience

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions