Skip to content

Get-Help does not display whole example body #11340

Closed

Description

Steps to reproduce

(Get-Help Out-Null).Examples

Expected behavior

PowerShell 5.1

> (Get-Help Out-Null).Examples

------------------- Example 1: Delete output -------------------

PS C:\> Get-ChildItem | Out-Null

This command gets items in the current location/directory, but its output is not passed through the pipeline nor
displayed at the command line. This is useful for hiding output that you do not need.

Actual behavior

PowerShell 7.0

> (Get-Help Out-Null).Examples

------------------- Example 1: Delete output -------------------

Get-ChildItem | Out-Null

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.6
PSEdition                      Core
GitCommitId                    7.0.0-preview.6-59-gca202da6437f5c9ed334725469f6d8f1cb7e5a2c
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

  1. added
    Issue-Question
    on Dec 13, 2019
  2. vexx32 commented on Dec 13, 2019

    @vexx32
    Collaborator

    I'm seeing this working properly. Can you try running Update-Help -ErrorAction SilentlyContinue and then check it again?

    Tested on MacOS and windows, environment data below:

    Name                           Value
    ----                           -----
    PSVersion                      7.0.0-preview.6
    PSEdition                      Core
    GitCommitId                    7.0.0-preview.6
    OS                             Microsoft Windows 10.0.18363
    Platform                       Win32NT
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1
    WSManStackVersion              3.0
    
    Name                           Value
    ----                           -----
    PSVersion                      7.0.0-preview.6
    PSEdition                      Core
    GitCommitId                    7.0.0-preview.6
    OS                             Darwin 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153…
    Platform                       Unix
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1
    WSManStackVersion              3.0
    
  3. kborowinski commented on Dec 13, 2019

    @kborowinski
    ContributorAuthor

    Just did the help update but it changed nothing.

  4. kborowinski commented on Dec 13, 2019

    @kborowinski
    ContributorAuthor

    OK, found it. It works on PowerShell Preview-6 but not on the daily build.

  5. iSazonov commented on Dec 13, 2019

    @iSazonov
    Collaborator

    Sean Wheeler (@sdwheeler) Could you please comment the issue?

  6. added
    WG-Interactive-HelpSystem
    on Dec 13, 2019
  7. sdwheeler commented on Dec 13, 2019

    @sdwheeler
    Contributor

    I confirm it works in 7.0.0-preview.6.

  8. iSazonov commented on Dec 13, 2019

    @iSazonov
    Collaborator

    Sean Wheeler (@sdwheeler) Why do this not work in daily build?

  9. vexx32 commented on Dec 13, 2019

    @vexx32
    Collaborator

    /cc Steve Lee (@SteveL-MSFT) have we changed anything relating to the help systems recently? Or does the issue originate somewhere else?

  10. sdwheeler commented on Dec 13, 2019

    @sdwheeler
    Contributor

    I only really work on the content side of the help. I don't know if or what changed in code.

  11. joeyaiello commented on Dec 13, 2019

    @joeyaiello
    Contributor

    Investigated this with Sean Wheeler (@sdwheeler) right now, seeing no repro on preview.6 and a definite repro on the nightly. We probably can't/shouldn't hold RC for a fix here, but it definitely needs to be fixed in RC....

    Also checked HelpCommand.cs, nothing looks different there, so maybe this has to do with the formatting system? Or something James Truher (@JamesWTruher) et all may have done around VT100? Paging Aditya Patwardhan (@adityapatwardhan) as well

  12. vexx32 commented on Dec 14, 2019

    @vexx32
    Collaborator

    Possibly the recent fix with FirstOrDefault had an effect? /Cc Dongbo Wang (@daxian-dbw)

  13. daxian-dbw commented on Dec 14, 2019

    @daxian-dbw
    Member

    Rain Sallow (/u/ta11ow) (@vexx32) the regression is not caused by the FirstOrDefault fix. That fix is included in our internal rc.1 release branch, and (Get-Help Out-Null).Examples works as expected on the build produced from that branch

    image

  14. daxian-dbw commented on Dec 14, 2019

    @daxian-dbw
    Member

    The culprit is #11193
    (Get-Help Out-Null).Examples works as expected until changes from this PR was merged in.

  15. iSazonov commented on Dec 14, 2019

    @iSazonov
    Collaborator

    Kris Borowinski (@kborowinski) Thanks for reporting the regression!

  16. added
    WG-Engine
    Issue-Bug
    and removed
    Issue-Question
    on Dec 14, 2019
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-BugResolution-FixedWG-EngineWG-Interactive-HelpSystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions