How come "more" does not work in the ISE?

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 5 years, 9 months ago.

  • Author
    Posts
  • #5386

    by TinkerTantrum at 2012-12-28 12:54:16

    A rather "noob" question from a "noob" user. I try to get output from the "ls" alias and it spits out all at once. I pipe it to more and it does not work.

    by nohandle at 2012-12-28 13:43:15

    It is probably because the more function calls the more.com Get-Command moreCommandType Name ModuleName
    ----------- ---- ----------
    Function more
    Application more.com
    (Get-Item function]param([string[]]$paths)
    $OutputEncoding = [System.Console]::OutputEncoding

    if($paths)
    {
    foreach ($file in $paths)
    {
    Get-Content $file | more.com
    }
    }
    else
    {
    $input | more.com
    }
    The more probably relies on the WindowSize property of the host that Console Host has set but the ISE does not.$Host.name
    $Host.UI.RawUI.WindowSize
    ConsoleHost
    Width Height
    ----- ------
    120 50

    Windows PowerShell ISE Host
    Hence the boundary (screen height) is not reached in the ISE and the output does not stop until its end.

You must be logged in to reply to this topic.