Powershell: .FORWARDHELPTARGETNAME: cannot forward to ABOUT

Created on 26 Jul 2020  路  13Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

FUNCTION NEW-EVIDENCE {
# .FORWARDHELPTARGETNAME ABOUT_COMMENT_BASED_HELP
HELP ABOUT_COMMENT_BASED_HELP -S
}
HELP NEW-EVIDENCE -S

Expected behavior

ABOUT COMMENT BASED HELP

Actual behavior

Synopsis


Syntax

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Issue-Question WG-Interactive-HelpSystem

All 13 comments

It seems that HelpFileHelpProvider should implement ProcessForwardedHelp.

What's the use case for making a command's help redirect to an about_? Usually it's used for proxy commands (and remoting I think).

It is not my use case but everyone seems to want just that. See the referenced PR.

What PR? I don't see any references.

@vexx32 it's right above my comment, #13176. They want it for prompt which I understand on one hand but... it really only makes sense for prompt and even then only kinda.

Github must be having issues, I don't see it at all. 馃槃

But yeah, prompt is a bit of a special case in that it's _designed_ for users to override it in the first place. Doesn't make a lot of sense for anything else IMO.

In other words, PROMPT is a callback. If we ever have another callback, we are going to bump into the same problem. OTOH, maybe we never get another one, as PROMPT itself should an event handler for Idle rather than a callback.

In other words, PROMPT is a callback. If we ever have another callback, we are going to bump into the same problem.

It's a callback that is intended to be able to be called by anyone who needs to display (or otherwise retrieve) the user's prompt string. That's why it should be documented as any other command imo, with just a "also see" link to about_Prompts. Same for TabExpansion2 which is a similar callback (with an even stronger case since it has parameters).

OTOH, maybe we never get another one, as PROMPT itself should an event handler for Idle rather than a callback.

All the prompt function does is return a string, the caller is responsible for how it's displayed. It can't be an event handler because it doesn't make sense for multiple handlers to be registered, and it wouldn't be able to be raised outside of the event handler class.

Also not important but it doesn't get invoked on Idle. When and how it's invoked is determined by the current PSHost typically. Fun fact, the OnIdle event will actually fire even in the middle of PSConsoleReadLine.ReadLine.

That's why it should be documented as any other command imo, with just a "also see" link to about_Prompts.

Sure, I almost said it myself. I failed to convince anyone though. I find myself lacking your clarity of expression 馃檨

.FORWARDHELPTARGETNAME cannot forward to content that does not have a HelpUri. About topics don't have HelpUris because they are text files and not compiled into MAML.

I fail to get the connexion, given that HelpUri is for remote help. Moreover, I boldly claim to have identified the part that is missing, and it does not have anything to do with HelpUri either. But if you are right, fixing it would require #8230.

@yecril71pl You are probably right about the HelpUri. The real issue is that About files are text files and not compiled into MAML.

I am sorry, this one is also real, as long as the people in power insist on having this particular redirect in place,

Was this page helpful?
0 / 5 - 0 ratings