PlatyPS cmdlets don't work with PSReadLine focused parameter help (ShowParameterHelp)
@adityapatwardhan ci sta già lavorando.
Dal 19/8/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PowerShell/platyPS
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PowerShell/platyPS#857 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
PowerShell/platyPS#863 ·
-
Export-MamlCommandHelp: a module file in the batch aborts the whole export and writes nothingAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
PowerShell/platyPS#862 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
PowerShell/platyPS#861 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
PowerShell/platyPS#860 · 1 commento ·
Tutte le issue di PowerShell/platyPS
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Esri/calcite-dotnet-toolkit#30 · 1 reazione ·
-
VideoViewer: rotated (portrait phone) videos shown sideways when system decimal separator is a commaAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Volodymyr-Petrunin/Bankomaten#45 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
thekid/inotify-win#45 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
AvaloniaUI/Avalonia#22420 ·
I maintainer di solito rispondono entro 1 giorno