Skip to content

Commit 1f28c5c

Browse files
authored
Fixes #11825 - Document the default edit mode (#11826)
* Document the default edit mode * fix xrefs
1 parent ac39029 commit 1f28c5c

File tree

8 files changed

+88
-37
lines changed

8 files changed

+88
-37
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Line_Editing.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to edit commands at the PowerShell command prompt.
33
Locale: en-US
4-
ms.date: 09/12/2022
4+
ms.date: 02/24/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_line_editing?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Line_Editing
@@ -15,8 +15,16 @@ Describes how to edit commands at the PowerShell command prompt.
1515

1616
## Long description
1717

18-
The PowerShell console has some useful keyboard shortcuts to help you edit
19-
commands at the PowerShell command prompt.
18+
The PSReadLine module provides useful keyboard shortcuts to help you edit
19+
commands at the PowerShell command prompt. The key bindings discussed in this
20+
article are the default key bindings on Windows platforms. You can create
21+
custom key bindings by using the `Set-PSReadLineKeyHandler` command.
22+
23+
You can change the edit mode using the `Set-PSReadLineOption` command.
24+
PSReadLine has three edit modes: `Emacs`, `Vi`, and `Windows`.
25+
26+
To see the current edit mode, use the `Get-PSReadLineOption` command. To see a
27+
list of the current key bindings, use the `Get-PSReadLineKeyHandler` command.
2028

2129
### Add a line
2230

@@ -76,6 +84,10 @@ key. To scroll through a list of values, press the <kbd>Tab</kbd> key again.
7684

7785
## See also
7886

79-
- [about_Command_Syntax](about_Command_Syntax.md)
80-
- [about_Path_Syntax](about_Path_Syntax.md)
81-
- [about_PSReadline](../../PSReadline/About/about_PSReadline.md)
87+
- [about_PSReadLine](../../PSReadLine/About/about_PSReadLine.md)
88+
- [about_Tab_Expansion](about_Tab_Expansion.md)
89+
- [Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption)
90+
- [Get-PSReadLineKeyHandler](xref:PSReadLine.Get-PSReadLineKeyHandler)
91+
- [Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption)
92+
- [Set-PSReadLineKeyHandler](xref:PSReadLine.Set-PSReadLineKeyHandler)
93+
- [Using PSReadLine key handlers](/powershell/scripting/learn/shell/using-keyhandlers)

reference/5.1/PSReadLine/Set-PSReadLineOption.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
33
Locale: en-US
44
Module Name: PSReadLine
5-
ms.date: 10/02/2023
5+
ms.date: 02/24/2025
66
online version: https://learn.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Set-PSReadLineOption
@@ -443,7 +443,7 @@ Specifies the command line editing mode. Using this parameter resets any key bin
443443

444444
The valid values are as follows:
445445

446-
- **Windows**: Key bindings emulate PowerShell, cmd, and Visual Studio.
446+
- **Windows**: Key bindings emulate PowerShell, cmd, and Visual Studio. (default on Windows)
447447
- **Emacs**: Key bindings emulate Bash or Emacs.
448448
- **Vi**: Key bindings emulate Vi.
449449

@@ -492,7 +492,7 @@ commands are added to history to preserve ordering during recall. However, you t
492492
to see the command multiple times when recalling or searching the history.
493493

494494
By default, the **HistoryNoDuplicates** property of the global **PSConsoleReadLineOptions** object
495-
is set to `True`. To change the property value, you must specify the value of the
495+
is set to `True`. To change the property value, you must specify the value of the
496496
**SwitchParameter** as follows: `-HistoryNoDuplicates:$False`. You can set back to `True` by using
497497
just the **SwitchParameter**, `-HistoryNoDuplicates`.
498498

reference/7.4/Microsoft.PowerShell.Core/About/about_Line_Editing.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to edit commands at the PowerShell command prompt.
33
Locale: en-US
4-
ms.date: 09/12/2022
4+
ms.date: 02/24/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_line_editing?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Line_Editing
@@ -15,8 +15,17 @@ Describes how to edit commands at the PowerShell command prompt.
1515

1616
## Long description
1717

18-
The PowerShell console has some useful keyboard shortcuts to help you edit
19-
commands at the PowerShell command prompt.
18+
The PSReadLine module provides useful keyboard shortcuts to help you edit
19+
commands at the PowerShell command prompt. The key bindings discussed in this
20+
article are the default key bindings on Windows platforms. You can create
21+
custom key bindings by using the `Set-PSReadLineKeyHandler` command.
22+
23+
On non-Windows platforms, PSReadLine defaults to the `Emacs` edit mode. You can
24+
change the edit mode using the `Set-PSReadLineOption` command. PSReadLine has
25+
three edit modes: `Emacs`, `Vi`, and `Windows`.
26+
27+
To see the current edit mode, use the `Get-PSReadLineOption` command. To see a
28+
list of the current key bindings, use the `Get-PSReadLineKeyHandler` command.
2029

2130
### Add a line
2231

@@ -76,6 +85,10 @@ key. To scroll through a list of values, press the <kbd>Tab</kbd> key again.
7685

7786
## See also
7887

79-
- [about_Command_Syntax](about_Command_Syntax.md)
80-
- [about_Path_Syntax](about_Path_Syntax.md)
81-
- [about_PSReadline](../../PSReadline/About/about_PSReadline.md)
88+
- [about_PSReadLine](../../PSReadLine/About/about_PSReadLine.md)
89+
- [about_Tab_Expansion](about_Tab_Expansion.md)
90+
- [Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption)
91+
- [Get-PSReadLineKeyHandler](xref:PSReadLine.Get-PSReadLineKeyHandler)
92+
- [Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption)
93+
- [Set-PSReadLineKeyHandler](xref:PSReadLine.Set-PSReadLineKeyHandler)
94+
- [Using PSReadLine key handlers](/powershell/scripting/learn/shell/using-keyhandlers)

reference/7.4/PSReadLine/Set-PSReadLineOption.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
33
Locale: en-US
44
Module Name: PSReadLine
5-
ms.date: 10/10/2023
5+
ms.date: 02/24/2025
66
online version: https://learn.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Set-PSReadLineOption
@@ -454,8 +454,8 @@ Specifies the command line editing mode. Using this parameter resets any key bin
454454

455455
The valid values are as follows:
456456

457-
- **Windows**: Key bindings emulate PowerShell, cmd, and Visual Studio.
458-
- **Emacs**: Key bindings emulate Bash or Emacs.
457+
- **Windows**: Key bindings emulate PowerShell, cmd, and Visual Studio. (default on Windows)
458+
- **Emacs**: Key bindings emulate Bash or Emacs. (default on non-Windows platforms)
459459
- **Vi**: Key bindings emulate Vi.
460460

461461
Use `Get-PSReadLineKeyHandler` to see the key bindings for the currently configured **EditMode**.
@@ -503,7 +503,7 @@ commands are added to history to preserve ordering during recall. However, you t
503503
to see the command multiple times when recalling or searching the history.
504504

505505
By default, the **HistoryNoDuplicates** property of the global **PSConsoleReadLineOptions** object
506-
is set to `True`. To change the property value, you must specify the value of the
506+
is set to `True`. To change the property value, you must specify the value of the
507507
**SwitchParameter** as follows: `-HistoryNoDuplicates:$False`. You can set back to `True` by using
508508
just the **SwitchParameter**, `-HistoryNoDuplicates`.
509509

reference/7.5/Microsoft.PowerShell.Core/About/about_Line_Editing.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to edit commands at the PowerShell command prompt.
33
Locale: en-US
4-
ms.date: 09/12/2022
4+
ms.date: 02/24/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_line_editing?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Line_Editing
@@ -15,8 +15,17 @@ Describes how to edit commands at the PowerShell command prompt.
1515

1616
## Long description
1717

18-
The PowerShell console has some useful keyboard shortcuts to help you edit
19-
commands at the PowerShell command prompt.
18+
The PSReadLine module provides useful keyboard shortcuts to help you edit
19+
commands at the PowerShell command prompt. The key bindings discussed in this
20+
article are the default key bindings on Windows platforms. You can create
21+
custom key bindings by using the `Set-PSReadLineKeyHandler` command.
22+
23+
On non-Windows platforms, PSReadLine defaults to the `Emacs` edit mode. You can
24+
change the edit mode using the `Set-PSReadLineOption` command. PSReadLine has
25+
three edit modes: `Emacs`, `Vi`, and `Windows`.
26+
27+
To see the current edit mode, use the `Get-PSReadLineOption` command. To see a
28+
list of the current key bindings, use the `Get-PSReadLineKeyHandler` command.
2029

2130
### Add a line
2231

@@ -76,6 +85,10 @@ key. To scroll through a list of values, press the <kbd>Tab</kbd> key again.
7685

7786
## See also
7887

79-
- [about_Command_Syntax](about_Command_Syntax.md)
80-
- [about_Path_Syntax](about_Path_Syntax.md)
81-
- [about_PSReadLine](../../PSReadline/About/about_PSReadline.md)
88+
- [about_PSReadLine](../../PSReadLine/About/about_PSReadLine.md)
89+
- [about_Tab_Expansion](about_Tab_Expansion.md)
90+
- [Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption)
91+
- [Get-PSReadLineKeyHandler](xref:PSReadLine.Get-PSReadLineKeyHandler)
92+
- [Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption)
93+
- [Set-PSReadLineKeyHandler](xref:PSReadLine.Set-PSReadLineKeyHandler)
94+
- [Using PSReadLine key handlers](/powershell/scripting/learn/shell/using-keyhandlers)

reference/7.5/PSReadLine/Set-PSReadLineOption.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
33
Locale: en-US
44
Module Name: PSReadLine
5-
ms.date: 10/10/2023
5+
ms.date: 02/24/2025
66
online version: https://learn.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Set-PSReadLineOption
@@ -454,8 +454,8 @@ Specifies the command line editing mode. Using this parameter resets any key bin
454454

455455
The valid values are as follows:
456456

457-
- **Windows**: Key bindings emulate PowerShell, cmd, and Visual Studio.
458-
- **Emacs**: Key bindings emulate Bash or Emacs.
457+
- **Windows**: Key bindings emulate PowerShell, cmd, and Visual Studio. (default on Windows)
458+
- **Emacs**: Key bindings emulate Bash or Emacs. (default on non-Windows platforms)
459459
- **Vi**: Key bindings emulate Vi.
460460

461461
Use `Get-PSReadLineKeyHandler` to see the key bindings for the currently configured **EditMode**.

reference/7.6/Microsoft.PowerShell.Core/About/about_Line_Editing.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to edit commands at the PowerShell command prompt.
33
Locale: en-US
4-
ms.date: 09/12/2022
4+
ms.date: 02/24/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_line_editing?view=powershell-7.6&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Line_Editing
@@ -15,8 +15,17 @@ Describes how to edit commands at the PowerShell command prompt.
1515

1616
## Long description
1717

18-
The PowerShell console has some useful keyboard shortcuts to help you edit
19-
commands at the PowerShell command prompt.
18+
The PSReadLine module provides useful keyboard shortcuts to help you edit
19+
commands at the PowerShell command prompt. The key bindings discussed in this
20+
article are the default key bindings on Windows platforms. You can create
21+
custom key bindings by using the `Set-PSReadLineKeyHandler` command.
22+
23+
On non-Windows platforms, PSReadLine defaults to the `Emacs` edit mode. You can
24+
change the edit mode using the `Set-PSReadLineOption` command. PSReadLine has
25+
three edit modes: `Emacs`, `Vi`, and `Windows`.
26+
27+
To see the current edit mode, use the `Get-PSReadLineOption` command. To see a
28+
list of the current key bindings, use the `Get-PSReadLineKeyHandler` command.
2029

2130
### Add a line
2231

@@ -76,6 +85,10 @@ key. To scroll through a list of values, press the <kbd>Tab</kbd> key again.
7685

7786
## See also
7887

79-
- [about_Command_Syntax](about_Command_Syntax.md)
80-
- [about_Path_Syntax](about_Path_Syntax.md)
81-
- [about_PSReadLine](../../PSReadline/About/about_PSReadline.md)
88+
- [about_PSReadLine](../../PSReadLine/About/about_PSReadLine.md)
89+
- [about_Tab_Expansion](about_Tab_Expansion.md)
90+
- [Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption)
91+
- [Get-PSReadLineKeyHandler](xref:PSReadLine.Get-PSReadLineKeyHandler)
92+
- [Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption)
93+
- [Set-PSReadLineKeyHandler](xref:PSReadLine.Set-PSReadLineKeyHandler)
94+
- [Using PSReadLine key handlers](/powershell/scripting/learn/shell/using-keyhandlers)

reference/7.6/PSReadLine/Set-PSReadLineOption.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
33
Locale: en-US
44
Module Name: PSReadLine
5-
ms.date: 10/10/2023
5+
ms.date: 02/24/2025
66
online version: https://learn.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Set-PSReadLineOption
@@ -454,8 +454,8 @@ Specifies the command line editing mode. Using this parameter resets any key bin
454454

455455
The valid values are as follows:
456456

457-
- **Windows**: Key bindings emulate PowerShell, cmd, and Visual Studio.
458-
- **Emacs**: Key bindings emulate Bash or Emacs.
457+
- **Windows**: Key bindings emulate PowerShell, cmd, and Visual Studio. (default on Windows)
458+
- **Emacs**: Key bindings emulate Bash or Emacs. (default on non-Windows platforms)
459459
- **Vi**: Key bindings emulate Vi.
460460

461461
Use `Get-PSReadLineKeyHandler` to see the key bindings for the currently configured **EditMode**.

0 commit comments

Comments
 (0)