File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9797 # We decorate that object with the typename `PowerShell.Markdown.Help`.
9898 $helpObj.pstypenames.clear ()
9999 $helpObj.pstypenames.add (' PowerShell.Markdown.Help' )
100+ $IsHelpAboutAlias = $helpObj.Name -ne $gotHelp.Name
101+ $helpObj | Add-Member NoteProperty IsAlias $IsHelpAboutAlias - Force
102+ if ($IsHelpAboutAlias ) {
103+ $aliasCommand = $ExecutionContext.SessionState.InvokeCommand.GetCommand ($gotHelp.Name , ' Alias' )
104+ $helpObj | Add-Member NoteProperty AliasCommand $aliasCommand - Force
105+ }
100106
101107 # Then we attach parameters passed to this command to the help object.
102108 # * `-Rename` will become `[string] .Rename`
103109 if ($Rename ) {
104110 $helpObj | Add-Member NoteProperty Rename $Rename - Force
111+ } elseif ($IsHelpAboutAlias ) {
112+ $helpObj | Add-Member NoteProperty Rename $gotHelp.Name - Force
105113 }
106114
107115 # * `-SectionOrder` will become `[string[]] .SectionOrder`
You can’t perform that action at this time.
0 commit comments