Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to edit commands at the PowerShell command prompt.
Locale: en-US
ms.date: 09/12/2022
ms.date: 02/24/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_line_editing?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Line_Editing
Expand All @@ -15,8 +15,16 @@ Describes how to edit commands at the PowerShell command prompt.

## Long description

The PowerShell console has some useful keyboard shortcuts to help you edit
commands at the PowerShell command prompt.
The PSReadLine module provides useful keyboard shortcuts to help you edit
commands at the PowerShell command prompt. The key bindings discussed in this
article are the default key bindings on Windows platforms. You can create
custom key bindings by using the `Set-PSReadLineKeyHandler` command.

You can change the edit mode using the `Set-PSReadLineOption` command.
PSReadLine has three edit modes: `Emacs`, `Vi`, and `Windows`.

To see the current edit mode, use the `Get-PSReadLineOption` command. To see a
list of the current key bindings, use the `Get-PSReadLineKeyHandler` command.

### Add a line

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

## See also

- [about_Command_Syntax](about_Command_Syntax.md)
- [about_Path_Syntax](about_Path_Syntax.md)
- [about_PSReadline](../../PSReadline/About/about_PSReadline.md)
- [about_PSReadLine](../../PSReadLine/About/about_PSReadLine.md)
- [about_Tab_Expansion](about_Tab_Expansion.md)
- [Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption)
- [Get-PSReadLineKeyHandler](xref:PSReadLine.Get-PSReadLineKeyHandler)
- [Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption)
- [Set-PSReadLineKeyHandler](xref:PSReadLine.Set-PSReadLineKeyHandler)
- [Using PSReadLine key handlers](/powershell/scripting/learn/shell/using-keyhandlers)
6 changes: 3 additions & 3 deletions reference/5.1/PSReadLine/Set-PSReadLineOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
Locale: en-US
Module Name: PSReadLine
ms.date: 10/02/2023
ms.date: 02/24/2025
online version: https://learn.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Set-PSReadLineOption
Expand Down Expand Up @@ -443,7 +443,7 @@ Specifies the command line editing mode. Using this parameter resets any key bin

The valid values are as follows:

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

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to edit commands at the PowerShell command prompt.
Locale: en-US
ms.date: 09/12/2022
ms.date: 02/24/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_line_editing?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Line_Editing
Expand All @@ -15,8 +15,17 @@ Describes how to edit commands at the PowerShell command prompt.

## Long description

The PowerShell console has some useful keyboard shortcuts to help you edit
commands at the PowerShell command prompt.
The PSReadLine module provides useful keyboard shortcuts to help you edit
commands at the PowerShell command prompt. The key bindings discussed in this
article are the default key bindings on Windows platforms. You can create
custom key bindings by using the `Set-PSReadLineKeyHandler` command.

On non-Windows platforms, PSReadLine defaults to the `Emacs` edit mode. You can
change the edit mode using the `Set-PSReadLineOption` command. PSReadLine has
three edit modes: `Emacs`, `Vi`, and `Windows`.

To see the current edit mode, use the `Get-PSReadLineOption` command. To see a
list of the current key bindings, use the `Get-PSReadLineKeyHandler` command.

### Add a line

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

## See also

- [about_Command_Syntax](about_Command_Syntax.md)
- [about_Path_Syntax](about_Path_Syntax.md)
- [about_PSReadline](../../PSReadline/About/about_PSReadline.md)
- [about_PSReadLine](../../PSReadLine/About/about_PSReadLine.md)
- [about_Tab_Expansion](about_Tab_Expansion.md)
- [Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption)
- [Get-PSReadLineKeyHandler](xref:PSReadLine.Get-PSReadLineKeyHandler)
- [Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption)
- [Set-PSReadLineKeyHandler](xref:PSReadLine.Set-PSReadLineKeyHandler)
- [Using PSReadLine key handlers](/powershell/scripting/learn/shell/using-keyhandlers)
8 changes: 4 additions & 4 deletions reference/7.4/PSReadLine/Set-PSReadLineOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
Locale: en-US
Module Name: PSReadLine
ms.date: 10/10/2023
ms.date: 02/24/2025
online version: https://learn.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Set-PSReadLineOption
Expand Down Expand Up @@ -454,8 +454,8 @@ Specifies the command line editing mode. Using this parameter resets any key bin

The valid values are as follows:

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

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to edit commands at the PowerShell command prompt.
Locale: en-US
ms.date: 09/12/2022
ms.date: 02/24/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_line_editing?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Line_Editing
Expand All @@ -15,8 +15,17 @@ Describes how to edit commands at the PowerShell command prompt.

## Long description

The PowerShell console has some useful keyboard shortcuts to help you edit
commands at the PowerShell command prompt.
The PSReadLine module provides useful keyboard shortcuts to help you edit
commands at the PowerShell command prompt. The key bindings discussed in this
article are the default key bindings on Windows platforms. You can create
custom key bindings by using the `Set-PSReadLineKeyHandler` command.

On non-Windows platforms, PSReadLine defaults to the `Emacs` edit mode. You can
change the edit mode using the `Set-PSReadLineOption` command. PSReadLine has
three edit modes: `Emacs`, `Vi`, and `Windows`.

To see the current edit mode, use the `Get-PSReadLineOption` command. To see a
list of the current key bindings, use the `Get-PSReadLineKeyHandler` command.

### Add a line

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

## See also

- [about_Command_Syntax](about_Command_Syntax.md)
- [about_Path_Syntax](about_Path_Syntax.md)
- [about_PSReadLine](../../PSReadline/About/about_PSReadline.md)
- [about_PSReadLine](../../PSReadLine/About/about_PSReadLine.md)
- [about_Tab_Expansion](about_Tab_Expansion.md)
- [Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption)
- [Get-PSReadLineKeyHandler](xref:PSReadLine.Get-PSReadLineKeyHandler)
- [Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption)
- [Set-PSReadLineKeyHandler](xref:PSReadLine.Set-PSReadLineKeyHandler)
- [Using PSReadLine key handlers](/powershell/scripting/learn/shell/using-keyhandlers)
6 changes: 3 additions & 3 deletions reference/7.5/PSReadLine/Set-PSReadLineOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
Locale: en-US
Module Name: PSReadLine
ms.date: 10/10/2023
ms.date: 02/24/2025
online version: https://learn.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Set-PSReadLineOption
Expand Down Expand Up @@ -454,8 +454,8 @@ Specifies the command line editing mode. Using this parameter resets any key bin

The valid values are as follows:

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

Use `Get-PSReadLineKeyHandler` to see the key bindings for the currently configured **EditMode**.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to edit commands at the PowerShell command prompt.
Locale: en-US
ms.date: 09/12/2022
ms.date: 02/24/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_line_editing?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Line_Editing
Expand All @@ -15,8 +15,17 @@ Describes how to edit commands at the PowerShell command prompt.

## Long description

The PowerShell console has some useful keyboard shortcuts to help you edit
commands at the PowerShell command prompt.
The PSReadLine module provides useful keyboard shortcuts to help you edit
commands at the PowerShell command prompt. The key bindings discussed in this
article are the default key bindings on Windows platforms. You can create
custom key bindings by using the `Set-PSReadLineKeyHandler` command.

On non-Windows platforms, PSReadLine defaults to the `Emacs` edit mode. You can
change the edit mode using the `Set-PSReadLineOption` command. PSReadLine has
three edit modes: `Emacs`, `Vi`, and `Windows`.

To see the current edit mode, use the `Get-PSReadLineOption` command. To see a
list of the current key bindings, use the `Get-PSReadLineKeyHandler` command.

### Add a line

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

## See also

- [about_Command_Syntax](about_Command_Syntax.md)
- [about_Path_Syntax](about_Path_Syntax.md)
- [about_PSReadLine](../../PSReadline/About/about_PSReadline.md)
- [about_PSReadLine](../../PSReadLine/About/about_PSReadLine.md)
- [about_Tab_Expansion](about_Tab_Expansion.md)
- [Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption)
- [Get-PSReadLineKeyHandler](xref:PSReadLine.Get-PSReadLineKeyHandler)
- [Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption)
- [Set-PSReadLineKeyHandler](xref:PSReadLine.Set-PSReadLineKeyHandler)
- [Using PSReadLine key handlers](/powershell/scripting/learn/shell/using-keyhandlers)
6 changes: 3 additions & 3 deletions reference/7.6/PSReadLine/Set-PSReadLineOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
Locale: en-US
Module Name: PSReadLine
ms.date: 10/10/2023
ms.date: 02/24/2025
online version: https://learn.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Set-PSReadLineOption
Expand Down Expand Up @@ -454,8 +454,8 @@ Specifies the command line editing mode. Using this parameter resets any key bin

The valid values are as follows:

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

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