Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

PlatyPS cmdlets don't work with PSReadLine focused parameter help (ShowParameterHelp)

Aperta
#802 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@adityapatwardhan ci sta già lavorando.

Dal 19/8/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Area-MAML
Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Steps to reproduce

When I try to get help for PlatyPS cmdlet parameters (like New-CommandInfo -CommandInfo and press ALT+h) it throws and error.
Repro:

Update-Help -Module Microsoft.PowerShell.PlatyPS # make sure not to use the autogenerated help
New-CommandHelp -CommandInfo # press ALT+h when cursor is at the end of -CommandInfo parameter to trigger ShowParameterHelp function

I think it can be related to https://github.com/PowerShell/platyPS/issues/801 (if the PlatyPS help is generated with PlatyPS itself) since PSReadline expects a default value and it is typically set to None if it is not provided. https://github.com/PowerShell/PSReadLine/blob/ceaad10f3d49df1b62957cf282f15b5a2fb2017f/PSReadLine/DynamicHelp.cs#L238C14-L238C226

Expected behavior
The focused parameter help should be shown for the parameter
Actual behavior
Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml
Thank you!

### Environment
PSReadLine: 2.3.6+d2e770f93b7a53d8660a6402eb29d1ae1c35e767
PowerShell: 7.5.2
OS: Microsoft Windows 10.0.26100
BufferWidth: 120
BufferHeight: 30

Last 145 Keys:

 h e l p Spacebar n e w - c o m m a n d h Tab Enter
 n e w - c o m m a n d h e Tab Spacebar - Tab Spacebar Backspace Alt+h Escape Escape U p d a t e - H e l - Backspace p Spacebar - p l Tab Backspace Backspace Backspace - m o Tab Spacebar M i c r o s o f t . P o w e r S h e l l . P l a t Tab Enter
 h e l p RightArrow Enter
 n e w - c o m m a n d Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace n e w p Backspace - c o m m a n Tab Spacebar - Tab Alt+h

### Exception

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference
   at CallSite.Target(Closure, CallSite, Object)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at Microsoft.PowerShell.PSConsoleReadLine.WriteParameterHelp(Object helpContent)
   at Microsoft.PowerShell.PSConsoleReadLine.WriteDynamicHelpContent(String commandName, String parameterName, Boolean isFullHelp)
   at Microsoft.PowerShell.PSConsoleReadLine.DynamicHelpImpl(Boolean isFullHelp)
   at Microsoft.PowerShell.PSConsoleReadLine.ShowParameterHelp(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)
Error details

Environment data
Name                           Value
----                           -----
PSVersion                      7.5.2
PSEdition                      Core
GitCommitId                    7.5.2
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Version

1.0.1

Visuals

No response

Lingua principale
C#
Stelle
870
Fork
166
Merge medio
21h 17m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/platyPS

Tutte le issue di PowerShell/platyPS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.