-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-By DesignThe reported behavior is by design.The reported behavior is by design.WG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of moduleshosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modules
Description
Command.CommandText
doesn't display parameters... this leaves the extension in an awkward position because we pass around PSCommand
's everywhere and there doesn't seem to be a friendly way of printing those out short of iterating over all the parameters ourselves.
I would have expected PowerShell to take care of this by default.
Steps to reproduce
[PowerShell]::Create().AddCommand("Get-Foo").AddParameter("WillThisShowUp", "Nope").Commands.Commands[0].CommandText
Expected behavior
Get-Foo -WillThisShowUp Nope
Actual behavior
Get-Foo
Environment data
Name Value
---- -----
PSVersion 7.1.0-daily.20200418
PSEdition Core
GitCommitId 7.1.0-daily.20200418
OS Darwin 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-By DesignThe reported behavior is by design.The reported behavior is by design.WG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of moduleshosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modules