Skip to content

WIP: Align InvokePrompt description with new behavior (MicrosoftDocs#12157) #12158

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >
This article documents the functions provided by PSReadLine. These functions
can be bound to keystrokes for easy access and invocation.
Locale: en-US
ms.date: 10/10/2023
ms.date: 06/17/2025
online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline_functions?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_PSReadLine_Functions
Expand Down Expand Up @@ -980,18 +980,20 @@ pressing the `#` key sends 10 `#` characters (`##########`) to the input line.
Similarly, you can use this with other operations, like `<Delete>` or
`Left-Arrow`.

- Windows mode: `<Alt+0>`, `<Alt+1>`, `<Alt+2>`, `<Alt+3>`, `<Alt+4>`, `<Alt+5>`,
`<Alt+6>`, `<Alt+7>`, `<Alt+8>`, `<Alt+9>`, `<Alt+->`
- Windows mode: `<Alt+0>`, `<Alt+1>`, `<Alt+2>`, `<Alt+3>`, `<Alt+4>`,
`<Alt+5>`, `<Alt+6>`, `<Alt+7>`, `<Alt+8>`, `<Alt+9>`, `<Alt+->`
- Emacs mode: `<Alt+0>`, `<Alt+1>`, `<Alt+2>`, `<Alt+3>`, `<Alt+4>`, `<Alt+5>`,
`<Alt+6>`, `<Alt+7>`, `<Alt+8>`, `<Alt+9>`, `<Alt+->`
- Vi command mode: `<0>`, `<1>`, `<2>`, `<3>`, `<4>`, `<5>`, `<6>`, `<7>`,
`<8>`, `<9>`

### InvokePrompt

Erases the current prompt and calls the prompt function to redisplay the
prompt. Useful for custom key handlers that change state. For example, change
the current directory.
Attempts to erase the current prompt and call the prompt function to redisplay
the prompt. Useful for custom key handlers that change state. For example,
change the current directory. This method can't overwrite a prompt that has
left the screen buffer. Calls to `InvokePrompt` with no `Y` position argument
return immediately if the prompt can't be overwritten.

- Function is unbound.

Expand Down
11 changes: 6 additions & 5 deletions reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >
This article documents the functions provided by PSReadLine. These functions
can be bound to keystrokes for easy access and invocation.
Locale: en-US
ms.date: 03/03/2025
ms.date: 06/17/2025
online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline_functions?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_PSReadLine_Functions
Expand Down Expand Up @@ -1179,9 +1179,11 @@ Similarly, you can use this with other operations, like `<Delete>` or

### InvokePrompt

Erases the current prompt and calls the prompt function to redisplay the
prompt. Useful for custom key handlers that change state. For example, change
the current directory.
Attempts to erase the current prompt and call the prompt function to redisplay
the prompt. Useful for custom key handlers that change state. For example,
change the current directory. This method can't overwrite a prompt that has
left the screen buffer. Calls to `InvokePrompt` with no `Y` position argument
return immediately if the prompt can't be overwritten.

- Function is unbound.

Expand Down Expand Up @@ -1337,7 +1339,6 @@ Show the tooltip of the currently selected list item in the full view.
- Emacs mode: `F4`
- Vi insert mode: `F4`


### SwitchPredictionView

Switch the view style for prediction between `InlineView` and `ListView`.
Expand Down
10 changes: 6 additions & 4 deletions reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >
This article documents the functions provided by PSReadLine. These functions
can be bound to keystrokes for easy access and invocation.
Locale: en-US
ms.date: 03/03/2025
ms.date: 06/17/2025
online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline_functions?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_PSReadLine_Functions
Expand Down Expand Up @@ -1179,9 +1179,11 @@ Similarly, you can use this with other operations, like `<Delete>` or

### InvokePrompt

Erases the current prompt and calls the prompt function to redisplay the
prompt. Useful for custom key handlers that change state. For example, change
the current directory.
Attempts to erase the current prompt and call the prompt function to redisplay
the prompt. Useful for custom key handlers that change state. For example,
change the current directory. This method can't overwrite a prompt that has
left the screen buffer. Calls to `InvokePrompt` with no `Y` position argument
return immediately if the prompt can't be overwritten.

- Function is unbound.

Expand Down
10 changes: 6 additions & 4 deletions reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >
This article documents the functions provided by PSReadLine. These functions
can be bound to keystrokes for easy access and invocation.
Locale: en-US
ms.date: 03/03/2025
ms.date: 06/17/2025
online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline_functions?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_PSReadLine_Functions
Expand Down Expand Up @@ -1179,9 +1179,11 @@ Similarly, you can use this with other operations, like `<Delete>` or

### InvokePrompt

Erases the current prompt and calls the prompt function to redisplay the
prompt. Useful for custom key handlers that change state. For example, change
the current directory.
Attempts to erase the current prompt and call the prompt function to redisplay
the prompt. Useful for custom key handlers that change state. For example,
change the current directory. This method can't overwrite a prompt that has
left the screen buffer. Calls to `InvokePrompt` with no `Y` position argument
return immediately if the prompt can't be overwritten.

- Function is unbound.

Expand Down