Skip to content

Commit a443952

Browse files
matt9ucciSean Wheeler
authored andcommitted
Fix Example 2 in Set-PSReadlineKeyHandler.md (#2058)
1 parent 8f3410a commit a443952

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

reference/5.0/PSReadline/Set-PSReadlineKeyHandler.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ PS C:\> Set-PSReadlineKeyHandler -Chord UpArrow -Function HistorySearchBackward
4141
This command binds the up arrow key to the function HistorySearchBackward, which uses the currently-entered command line as the start of the search string when it is searching through command history.
4242

4343
### Example 2: Bind a key to a script block
44-
```
45-
PS C:\> Set-PSReadlineKeyHandler -Chord Shift+Ctrl+B -ScriptBlock {
46-
[PSConsoleUtilities.PSConsoleReadLine]::RevertLine()
47-
[PSConsoleUtilities.PSConsoleReadLine]::Insert('build')
48-
[PSConsoleUtilities.PSConsoleReadLine]::AcceptLine()
44+
```powershell
45+
Set-PSReadlineKeyHandler -Chord Ctrl+Shift+B -ScriptBlock {
46+
[Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
47+
[Microsoft.PowerShell.PSConsoleReadLine]::Insert('build')
48+
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
4949
}
5050
```
5151

reference/5.1/PSReadline/Set-PSReadlineKeyHandler.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ PS C:\> Set-PSReadlineKeyHandler -Chord UpArrow -Function HistorySearchBackward
4141
This command binds the up arrow key to the function HistorySearchBackward, which uses the currently-entered command line as the start of the search string when it is searching through command history.
4242

4343
### Example 2: Bind a key to a script block
44-
```
45-
PS C:\> Set-PSReadlineKeyHandler -Chord Shift+Ctrl+B -ScriptBlock {
46-
[PSConsoleUtilities.PSConsoleReadLine]::RevertLine()
47-
[PSConsoleUtilities.PSConsoleReadLine]::Insert('build')
48-
[PSConsoleUtilities.PSConsoleReadLine]::AcceptLine()
44+
```powershell
45+
Set-PSReadlineKeyHandler -Chord Ctrl+Shift+B -ScriptBlock {
46+
[Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
47+
[Microsoft.PowerShell.PSConsoleReadLine]::Insert('build')
48+
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
4949
}
5050
```
5151

reference/6/PSReadLine/Set-PSReadlineKeyHandler.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ PS C:\> Set-PSReadlineKeyHandler -Chord UpArrow -Function HistorySearchBackward
4141
This command binds the up arrow key to the function HistorySearchBackward, which uses the currently-entered command line as the start of the search string when it is searching through command history.
4242

4343
### Example 2: Bind a key to a script block
44-
```
45-
PS C:\> Set-PSReadlineKeyHandler -Chord Shift+Ctrl+B -ScriptBlock {
46-
[PSConsoleUtilities.PSConsoleReadLine]::RevertLine()
47-
[PSConsoleUtilities.PSConsoleReadLine]::Insert('build')
48-
[PSConsoleUtilities.PSConsoleReadLine]::AcceptLine()
44+
```powershell
45+
Set-PSReadlineKeyHandler -Chord Ctrl+Shift+B -ScriptBlock {
46+
[Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
47+
[Microsoft.PowerShell.PSConsoleReadLine]::Insert('build')
48+
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
4949
}
5050
```
5151

0 commit comments

Comments
 (0)