From c3953c2ba24e47a65ca7c86eb7d03a0927567561 Mon Sep 17 00:00:00 2001 From: jftkcs <120062444+jftkcs@users.noreply.github.com> Date: Mon, 16 Jun 2025 22:46:24 -0700 Subject: [PATCH 1/3] Update InvokePrompt behavior (#12157) --- .../5.1/PSReadLine/About/about_PSReadLine_Functions.md | 6 ++++-- .../7.4/PSReadLine/About/about_PSReadLine_Functions.md | 6 ++++-- .../7.5/PSReadLine/About/about_PSReadLine_Functions.md | 6 ++++-- .../7.6/PSReadLine/About/about_PSReadLine_Functions.md | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md b/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md index b8dbfe6a69e..295e4c1785f 100644 --- a/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md @@ -989,9 +989,11 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Erases the current prompt and calls the prompt function to redisplay the +Attempt 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. +the current directory. This method cannot overwrite a prompt that has left the +screen buffer. Calls to InvokePrompt with no Y position argument will +immediately return if the prompt cannot be overwritten. - Function is unbound. diff --git a/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md index fcaa0593b2d..2173b00f3ca 100644 --- a/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md @@ -1179,9 +1179,11 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Erases the current prompt and calls the prompt function to redisplay the +Attempt 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. +the current directory. This method cannot overwrite a prompt that has left the +screen buffer. Calls to InvokePrompt with no Y position argument will +immediately return if the prompt cannot be overwritten. - Function is unbound. diff --git a/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md index 19e467d7192..8baa03e0687 100644 --- a/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md @@ -1179,9 +1179,11 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Erases the current prompt and calls the prompt function to redisplay the +Attempt 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. +the current directory. This method cannot overwrite a prompt that has left the +screen buffer. Calls to InvokePrompt with no Y position argument will +immediately return if the prompt cannot be overwritten. - Function is unbound. diff --git a/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md index 16fcd88cab4..a6ca52c9650 100644 --- a/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md @@ -1179,9 +1179,11 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Erases the current prompt and calls the prompt function to redisplay the +Attempt 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. +the current directory. This method cannot overwrite a prompt that has left the +screen buffer. Calls to InvokePrompt with no Y position argument will +immediately return if the prompt cannot be overwritten. - Function is unbound. From e350c5a98e68a36008d99bd9a674e675b3db0e40 Mon Sep 17 00:00:00 2001 From: jftkcs <120062444+jftkcs@users.noreply.github.com> Date: Mon, 16 Jun 2025 22:54:15 -0700 Subject: [PATCH 2/3] Fix line lengths --- .../5.1/PSReadLine/About/about_PSReadLine_Functions.md | 8 ++++---- .../7.4/PSReadLine/About/about_PSReadLine_Functions.md | 8 ++++---- .../7.5/PSReadLine/About/about_PSReadLine_Functions.md | 8 ++++---- .../7.6/PSReadLine/About/about_PSReadLine_Functions.md | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md b/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md index 295e4c1785f..9f22b28b594 100644 --- a/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md @@ -989,10 +989,10 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Attempt 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 cannot overwrite a prompt that has left the -screen buffer. Calls to InvokePrompt with no Y position argument will +Attempt 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 cannot overwrite a prompt that has +left the screen buffer. Calls to InvokePrompt with no Y position argument will immediately return if the prompt cannot be overwritten. - Function is unbound. diff --git a/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md index 2173b00f3ca..ca99e152894 100644 --- a/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md @@ -1179,10 +1179,10 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Attempt 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 cannot overwrite a prompt that has left the -screen buffer. Calls to InvokePrompt with no Y position argument will +Attempt 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 cannot overwrite a prompt that has +left the screen buffer. Calls to InvokePrompt with no Y position argument will immediately return if the prompt cannot be overwritten. - Function is unbound. diff --git a/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md index 8baa03e0687..2330bb1f2ba 100644 --- a/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md @@ -1179,10 +1179,10 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Attempt 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 cannot overwrite a prompt that has left the -screen buffer. Calls to InvokePrompt with no Y position argument will +Attempt 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 cannot overwrite a prompt that has +left the screen buffer. Calls to InvokePrompt with no Y position argument will immediately return if the prompt cannot be overwritten. - Function is unbound. diff --git a/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md index a6ca52c9650..012e209c400 100644 --- a/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md @@ -1179,10 +1179,10 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Attempt 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 cannot overwrite a prompt that has left the -screen buffer. Calls to InvokePrompt with no Y position argument will +Attempt 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 cannot overwrite a prompt that has +left the screen buffer. Calls to InvokePrompt with no Y position argument will immediately return if the prompt cannot be overwritten. - Function is unbound. From f2b64b7025c0054601bd717aa49a54cc3035f859 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Tue, 17 Jun 2025 09:11:33 -0500 Subject: [PATCH 3/3] Minor edits --- .../PSReadLine/About/about_PSReadLine_Functions.md | 14 +++++++------- .../PSReadLine/About/about_PSReadLine_Functions.md | 11 +++++------ .../PSReadLine/About/about_PSReadLine_Functions.md | 10 +++++----- .../PSReadLine/About/about_PSReadLine_Functions.md | 10 +++++----- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md b/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md index 9f22b28b594..7ec9188a8bb 100644 --- a/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md @@ -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 @@ -980,8 +980,8 @@ pressing the `#` key sends 10 `#` characters (`##########`) to the input line. Similarly, you can use this with other operations, like `` or `Left-Arrow`. -- Windows mode: ``, ``, ``, ``, ``, ``, - ``, ``, ``, ``, `` +- Windows mode: ``, ``, ``, ``, ``, + ``, ``, ``, ``, ``, `` - Emacs mode: ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, `` - Vi command mode: `<0>`, `<1>`, `<2>`, `<3>`, `<4>`, `<5>`, `<6>`, `<7>`, @@ -989,11 +989,11 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Attempt to erase the current prompt and call the prompt function to redisplay +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 cannot overwrite a prompt that has -left the screen buffer. Calls to InvokePrompt with no Y position argument will -immediately return if the prompt cannot be overwritten. +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. diff --git a/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md index ca99e152894..e63d7752a54 100644 --- a/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md @@ -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 @@ -1179,11 +1179,11 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Attempt to erase the current prompt and call the prompt function to redisplay +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 cannot overwrite a prompt that has -left the screen buffer. Calls to InvokePrompt with no Y position argument will -immediately return if the prompt cannot be overwritten. +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. @@ -1339,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`. diff --git a/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md index 2330bb1f2ba..b9cf6973d7d 100644 --- a/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md @@ -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 @@ -1179,11 +1179,11 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Attempt to erase the current prompt and call the prompt function to redisplay +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 cannot overwrite a prompt that has -left the screen buffer. Calls to InvokePrompt with no Y position argument will -immediately return if the prompt cannot be overwritten. +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. diff --git a/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md index 012e209c400..7c0ef156b9f 100644 --- a/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md @@ -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 @@ -1179,11 +1179,11 @@ Similarly, you can use this with other operations, like `` or ### InvokePrompt -Attempt to erase the current prompt and call the prompt function to redisplay +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 cannot overwrite a prompt that has -left the screen buffer. Calls to InvokePrompt with no Y position argument will -immediately return if the prompt cannot be overwritten. +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.