Skip to content

Commit c5080f4

Browse files
committed
Fix typos and add links for PSConsoleHostReadline
1 parent 553d099 commit c5080f4

File tree

6 files changed

+68
-62
lines changed

6 files changed

+68
-62
lines changed
Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
---
2-
description: Explains how to create a customize how PowerShell reads input at the console prompt.
2+
description: Explains how to customize how PowerShell reads input at the console prompt.
33
Locale: en-US
4-
ms.date: 01/04/2018
4+
ms.date: 01/09/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_psconsolehostreadline?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_PSConsoleHostReadLine
88
---
9-
109
# about_PSConsoleHostReadLine
1110

1211
## Short description
13-
14-
Explains how to create a customize how PowerShell reads input at the console
15-
prompt.
12+
Explains how to customize how PowerShell reads input at the console prompt.
1613

1714
## Long description
1815

19-
Starting in Windows PowerShell V3, you can write a function named
20-
PSConsoleHostReadLine that overrides the default way that console input is
16+
Starting in Windows PowerShell 3.0, you can write a function named
17+
`PSConsoleHostReadLine` that overrides the default way that console input is
2118
processed.
2219

23-
### EXAMPLES
20+
This function is extended by the **PSReadLine** module.
2421

25-
The following example launches Notepad and gets input from a text File that
22+
### Examples
23+
24+
The following example launches Notepad and gets input from a text file that
2625
the user creates:
2726

2827
```powershell
29-
function PSConsoleHostReadLine
30-
{
28+
function PSConsoleHostReadLine {
3129
$inputFile = Join-Path $env:TEMP PSConsoleHostReadLine
3230
Set-Content $inputFile "PS > "
3331
@@ -39,18 +37,21 @@ function PSConsoleHostReadLine
3937
}
4038
```
4139

42-
### REMARKS
43-
44-
By default, PowerShell reads input from the console in what is known as
45-
"Cooked Mode" -- in which the Windows console subsystem handles all the
46-
keypresses, F7 menus, and other input. When you press Enter or Tab, Windows
47-
PowerShell gets the text that you have typed up to that point. There is no way
48-
for it to know that you pressed Ctrl-R, Ctrl-A, Ctrl-E, or any other keys
49-
before pressing Enter or Tab. In Windows PowerShell version 3, the
50-
PSConsoleHostReadLine function solves this issue. When you define a function
51-
named PSConsoleHostReadline in the Windows PowerShell console host, Windows
40+
### Remarks
41+
42+
By default, PowerShell reads input from the console in what is known as "Cooked
43+
Mode" -- in which the Windows console subsystem handles all the keypresses,
44+
<kbd>F7</kbd> menus, and other input. When you press <kbd>Enter</kbd> or
45+
<kbd>Tab</kbd>, PowerShell gets the text that you have typed up to that point.
46+
There is no way for it to know that you pressed <kbd>Ctrl</kbd>+<kbd>R</kbd>,
47+
<kbd>Ctrl</kbd>+<kbd>A</kbd>, <kbd>Ctrl</kbd>+<kbd>E</kbd>, or any other keys
48+
before pressing <kbd>Enter</kbd> or <kbd>Tab</kbd>. In Windows PowerShell 3.0,
49+
the `PSConsoleHostReadLine` function solves this issue. When you define a
50+
function named `PSConsoleHostReadline` in the PowerShell console host,
5251
PowerShell calls that function instead of the "Cooked Mode" input mechanism.
5352

5453
## See Also
5554

5655
- [about_Prompts](about_Prompts.md)
56+
- [PSConsoleHostReadLine](/powershell/module/psreadline/psconsolehostreadline)
57+
- [High-Level Console Modes](/windows/console/high-level-console-modes)

reference/5.1/PSReadLine/PSConsoleHostReadLine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: PSReadLine-help.xml
33
Locale: en-US
44
Module Name: PSReadLine
5-
ms.date: 06/27/2024
5+
ms.date: 01/09/2025
66
online version: https://learn.microsoft.com/powershell/module/psreadline/psconsolehostreadline?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: PSConsoleHostReadLine
Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
---
2-
description: Explains how to create a customize how PowerShell reads input at the console prompt.
2+
description: Explains how to customize how PowerShell reads input at the console prompt.
33
Locale: en-US
4-
ms.date: 01/04/2018
4+
ms.date: 01/09/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_psconsolehostreadline?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_PSConsoleHostReadLine
88
---
99
# about_PSConsoleHostReadLine
1010

1111
## Short description
12-
Explains how to create a customize how PowerShell reads input at the console
13-
prompt.
12+
Explains how to customize how PowerShell reads input at the console prompt.
1413

1514
## Long description
1615

1716
Starting in Windows PowerShell 3.0, you can write a function named
18-
PSConsoleHostReadLine that overrides the default way that console input is
17+
`PSConsoleHostReadLine` that overrides the default way that console input is
1918
processed.
2019

21-
### EXAMPLES
20+
This function is extended by the **PSReadLine** module.
2221

23-
The following example launches Notepad and gets input from a text File that
22+
### Examples
23+
24+
The following example launches Notepad and gets input from a text file that
2425
the user creates:
2526

2627
```powershell
27-
function PSConsoleHostReadLine
28-
{
28+
function PSConsoleHostReadLine {
2929
$inputFile = Join-Path $env:TEMP PSConsoleHostReadLine
3030
Set-Content $inputFile "PS > "
3131
@@ -37,18 +37,21 @@ function PSConsoleHostReadLine
3737
}
3838
```
3939

40-
### REMARKS
40+
### Remarks
4141

4242
By default, PowerShell reads input from the console in what is known as "Cooked
43-
Mode" -- in which the Windows console subsystem handles all the keypresses, F7
44-
menus, and other input. When you press Enter or Tab, PowerShell gets the text
45-
that you have typed up to that point. There is no way for it to know that you
46-
pressed Ctrl-R, Ctrl-A, Ctrl-E, or any other keys before pressing Enter or Tab.
47-
In Windows PowerShell 3.0, the PSConsoleHostReadLine function solves this
48-
issue. When you define a function named PSConsoleHostReadline in the PowerShell
49-
console host, PowerShell calls that function instead of the "Cooked Mode" input
50-
mechanism.
43+
Mode" -- in which the Windows console subsystem handles all the keypresses,
44+
<kbd>F7</kbd> menus, and other input. When you press <kbd>Enter</kbd> or
45+
<kbd>Tab</kbd>, PowerShell gets the text that you have typed up to that point.
46+
There is no way for it to know that you pressed <kbd>Ctrl</kbd>+<kbd>R</kbd>,
47+
<kbd>Ctrl</kbd>+<kbd>A</kbd>, <kbd>Ctrl</kbd>+<kbd>E</kbd>, or any other keys
48+
before pressing <kbd>Enter</kbd> or <kbd>Tab</kbd>. In Windows PowerShell 3.0,
49+
the `PSConsoleHostReadLine` function solves this issue. When you define a
50+
function named `PSConsoleHostReadline` in the PowerShell console host,
51+
PowerShell calls that function instead of the "Cooked Mode" input mechanism.
5152

5253
## See Also
5354

5455
- [about_Prompts](about_Prompts.md)
56+
- [PSConsoleHostReadLine](/powershell/module/psreadline/psconsolehostreadline)
57+
- [High-Level Console Modes](/windows/console/high-level-console-modes)

reference/7.4/PSReadLine/PSConsoleHostReadLine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: PSReadLine-help.xml
33
Locale: en-US
44
Module Name: PSReadLine
5-
ms.date: 06/27/2024
5+
ms.date: 01/09/2025
66
online version: https://learn.microsoft.com/powershell/module/psreadline/psconsolehostreadline?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: PSConsoleHostReadLine
Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
---
2-
description: Explains how to create a customize how PowerShell reads input at the console prompt.
2+
description: Explains how to customize how PowerShell reads input at the console prompt.
33
Locale: en-US
4-
ms.date: 01/04/2018
4+
ms.date: 01/09/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_psconsolehostreadline?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_PSConsoleHostReadLine
88
---
99
# about_PSConsoleHostReadLine
1010

1111
## Short description
12-
13-
Explains how to create a customize how PowerShell reads input at the console
14-
prompt.
12+
Explains how to customize how PowerShell reads input at the console prompt.
1513

1614
## Long description
1715

1816
Starting in Windows PowerShell 3.0, you can write a function named
19-
PSConsoleHostReadLine that overrides the default way that console input is
17+
`PSConsoleHostReadLine` that overrides the default way that console input is
2018
processed.
2119

22-
### EXAMPLES
20+
This function is extended by the **PSReadLine** module.
21+
22+
### Examples
2323

24-
The following example launches Notepad and gets input from a text File that
24+
The following example launches Notepad and gets input from a text file that
2525
the user creates:
2626

2727
```powershell
28-
function PSConsoleHostReadLine
29-
{
28+
function PSConsoleHostReadLine {
3029
$inputFile = Join-Path $env:TEMP PSConsoleHostReadLine
3130
Set-Content $inputFile "PS > "
3231
@@ -38,18 +37,21 @@ function PSConsoleHostReadLine
3837
}
3938
```
4039

41-
### REMARKS
40+
### Remarks
4241

4342
By default, PowerShell reads input from the console in what is known as "Cooked
44-
Mode" -- in which the Windows console subsystem handles all the keypresses, F7
45-
menus, and other input. When you press Enter or Tab, PowerShell gets the text
46-
that you have typed up to that point. There is no way for it to know that you
47-
pressed Ctrl-R, Ctrl-A, Ctrl-E, or any other keys before pressing Enter or Tab.
48-
In Windows PowerShell 3.0, the PSConsoleHostReadLine function solves this
49-
issue. When you define a function named PSConsoleHostReadline in the PowerShell
50-
console host, PowerShell calls that function instead of the "Cooked Mode" input
51-
mechanism.
43+
Mode" -- in which the Windows console subsystem handles all the keypresses,
44+
<kbd>F7</kbd> menus, and other input. When you press <kbd>Enter</kbd> or
45+
<kbd>Tab</kbd>, PowerShell gets the text that you have typed up to that point.
46+
There is no way for it to know that you pressed <kbd>Ctrl</kbd>+<kbd>R</kbd>,
47+
<kbd>Ctrl</kbd>+<kbd>A</kbd>, <kbd>Ctrl</kbd>+<kbd>E</kbd>, or any other keys
48+
before pressing <kbd>Enter</kbd> or <kbd>Tab</kbd>. In Windows PowerShell 3.0,
49+
the `PSConsoleHostReadLine` function solves this issue. When you define a
50+
function named `PSConsoleHostReadline` in the PowerShell console host,
51+
PowerShell calls that function instead of the "Cooked Mode" input mechanism.
5252

5353
## See Also
5454

5555
- [about_Prompts](about_Prompts.md)
56+
- [PSConsoleHostReadLine](/powershell/module/psreadline/psconsolehostreadline)
57+
- [High-Level Console Modes](/windows/console/high-level-console-modes)

reference/7.5/PSReadLine/PSConsoleHostReadLine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: PSReadLine-help.xml
33
Locale: en-US
44
Module Name: PSReadLine
5-
ms.date: 06/27/2024
5+
ms.date: 01/09/2025
66
online version: https://learn.microsoft.com/powershell/module/psreadline/psconsolehostreadline?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: PSConsoleHostReadLine

0 commit comments

Comments
 (0)