Skip to content

HelpMessage parameter attribute does not dispay inside VSCode terminal #836

@anwather

Description

@anwather

System Details

  • Operating system name and version: Windows 10 1703

Copy / paste the below commands into the PowerShell Integrated Terminal, and paste the output here

C:\source\My-Scripts> code -v

1.12.2
19222cdc84ce72202478ba1cec5cb557b71163de
PS C:\source\My-Scripts> $pseditor.EditorServicesVersion


Major  Minor  Build  Revision
-----  -----  -----  --------
1      2      1      0


PS C:\source\My-Scripts> code --list-extensions --show-versions

donjayamanne.githistory@0.2.0
kube.theme-kay@0.2.0
ms-vscode.PowerShell@1.2.1
retrotheme.theme-retro@0.1.0

Issue Description

When using the helpmessage parameter attribute - if I call the function in the terminal without a mandatory parameter the helpmessage cannot be displayed.

Function Demo-Help  {
 [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$true,HelpMessage="Enter a string for computer name",Position=0)]
        [string]$ComputerName
    )
}

From the terminal:

PS C:\source\My-Scripts> Demo-Help

cmdlet Demo-Help at command pipeline position 1
Supply values for the following parameters:
ComputerName:

From the PowerShell CLI or ISE:

C:\source\My-Scripts [master ≡ +2 ~1 -0 !]> demo-help

cmdlet Demo-Help at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
ComputerName:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions