-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Closed
Copy link
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Interactive-HelpSystemhelp infrastructure and formatting of helphelp infrastructure and formatting of help
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
help is a proxy function for Get-Help that is loaded into the initial session state when PowerShell starts. As a proxy function, it defines all the parameters that Get-Help has. The definition of the proxy function was created for Windows PowerShell but never adjusted for non-Windows.
See source code -
PowerShell/src/System.Management.Automation/engine/InitialSessionState.cs
Lines 4185 to 4187 in 7363096
| [Parameter(ParameterSetName='ShowWindow', Mandatory=$true)] | |
| [switch] | |
| ${ShowWindow}) |
The proxy function includes the -ShowWindow parameter for all platforms.
Expected behavior
PS /home/sdwheeler> help Get-Command -ShowWindow
help: A parameter cannot be found that matches parameter name 'ShowWindow'.Actual behavior
PS /home/sdwheeler> help Get-Command -ShowWindow
Get-Help:
Line |
64 | $help = Get-Help @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~
| A parameter cannot be found that matches parameter name 'ShowWindow'.Error details
No response
Environment data
PS /home/sdwheeler> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.5
PSEdition Core
GitCommitId 7.3.5
OS Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS /home/sdwheeler> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focalVisuals
No response
Metadata
Metadata
Assignees
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Interactive-HelpSystemhelp infrastructure and formatting of helphelp infrastructure and formatting of help