Skip to content

ShowCommandHelp (F1) doesn't work for about_* topics relating to language keywords, specifically, if the "about_" prefix isn't used. #3570

Open
@mklement0

Description

@mklement0

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

N/A

Screenshot

N/A

Environment data

PS Version: 7.4.0-preview.1
PS HostName: ConsoleHost
PSReadLine Version: 2.2.6
PSReadLine EditMode: Emacs
OS: Darwin JDoes-MacBook-Pro.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 arm64
BufferWidth: 180
BufferHeight: 60

Steps to reproduce

A - currently undocumented - feature of the ShowCommandHelp function (F1) is that it can act on the titles of conceptual help topics (about_*) too - both with and without the about_ prefix (although omitting the prefix sometimes results in surprising behavior).

# OK: Shows help topic about_Scopes in alternate screen buffer, with paging.
PS> scopes # <- press F1 here

However, this doesn't work for language keywords, such as if, while, return, ... - _except_ if the about_` prefix is also used.

# OK, thanks to explicit "about_" prefix
PS> about_If # <- press F1 here

# !! BROKEN: no action is taken
PS> if # <- press F1 here

# WORKAROUND: Use minimal prefix "_"
PS> _if # <- press F1 here

Related, more general problem:

Expected behavior

Typing if followed by F1 should show the about_If help topic.

Actual behavior

Nothing happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CommandHelpLabel for issues related to ShowCommandHelp and the pagerIssue-EnhancementIt's a feature request.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions