Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
mklement0 opened this issue Feb 6, 2023 · 0 comments
Labels
Area-CommandHelp Label for issues related to ShowCommandHelp and the pager Issue-Enhancement It's a feature request.

Comments

@mklement0
Copy link

mklement0 commented Feb 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CommandHelp Label for issues related to ShowCommandHelp and the pager Issue-Enhancement It's a feature request.
Projects
None yet
Development

No branches or pull requests

3 participants