Skip to content

Commit 00ee10d

Browse files
Adding reference to example for history handler for PSRL (#10284)
* Adding note to see set-psrl option for adding history filters * Editorial changes
1 parent 65898ba commit 00ee10d

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

reference/5.1/PSReadLine/About/about_PSReadLine.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: PSReadLine provides an improved command-line editing experience in the PowerShell console.
33
Locale: en-US
4-
ms.date: 11/14/2022
5-
online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline?view=powershell-7.3&WT.mc_id=ps-gethelp
4+
ms.date: 07/18/2023
5+
online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about PSReadLine
88
---
@@ -162,6 +162,11 @@ Invoke-WebRequest -Token xxx # Expr-value as argument to '-Token'.
162162
Get-ResultFromTwo -Secret1 (Get-Secret -Name blah -AsPlainText) -Secret2 sdv87ysdfayf798hfasd8f7ha # '-Secret2' has expr-value argument.
163163
```
164164

165+
If there are other commands you don't want written to the history files, you
166+
can use the **AddToHistoryHandler** parameter of the `Set-PSReadLineOption`
167+
cmdlet. For an example of how to use **AddToHistoryHandler**, see Example 7 of
168+
[Set-PSReadLineOption](/powershell/module/psreadline/set-psreadlineoption#example-7-use-historyhandler-to-filter-commands-added-to-history).
169+
165170
### PSReadLine release history
166171

167172
There have been many updates to PSReadLine since the version that ships in

reference/7.2/PSReadLine/About/about_PSReadLine.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: PSReadLine provides an improved command-line editing experience in the PowerShell console.
33
Locale: en-US
4-
ms.date: 11/14/2022
4+
ms.date: 07/18/2023
55
online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline?view=powershell-7.2&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about PSReadLine
@@ -204,6 +204,11 @@ Invoke-WebRequest -Token xxx # Expr-value as argument to '-Token'.
204204
Get-ResultFromTwo -Secret1 (Get-Secret -Name blah -AsPlainText) -Secret2 sdv87ysdfayf798hfasd8f7ha # '-Secret2' has expr-value argument.
205205
```
206206

207+
If there are other commands you don't want written to the history files, you
208+
can use the **AddToHistoryHandler** parameter of the `Set-PSReadLineOption`
209+
cmdlet. For an example of how to use **AddToHistoryHandler**, see Example 7 of
210+
[Set-PSReadLineOption](/powershell/module/psreadline/set-psreadlineoption#example-7-use-historyhandler-to-filter-commands-added-to-history).
211+
207212
### PSReadLine release history
208213

209214
There have been many updates to PSReadLine since the version that ships in

reference/7.3/PSReadLine/About/about_PSReadLine.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: PSReadLine provides an improved command-line editing experience in the PowerShell console.
33
Locale: en-US
4-
ms.date: 11/14/2022
4+
ms.date: 07/18/2023
55
online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline?view=powershell-7.3&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about PSReadLine
@@ -204,6 +204,11 @@ Invoke-WebRequest -Token xxx # Expr-value as argument to '-Token'.
204204
Get-ResultFromTwo -Secret1 (Get-Secret -Name blah -AsPlainText) -Secret2 sdv87ysdfayf798hfasd8f7ha # '-Secret2' has expr-value argument.
205205
```
206206

207+
If there are other commands you don't want written to the history files, you
208+
can use the **AddToHistoryHandler** parameter of the `Set-PSReadLineOption`
209+
cmdlet. For an example of how to use **AddToHistoryHandler**, see Example 7 of
210+
[Set-PSReadLineOption](/powershell/module/psreadline/set-psreadlineoption#example-7-use-historyhandler-to-filter-commands-added-to-history).
211+
207212
### PSReadLine release history
208213

209214
There have been many updates to PSReadLine since the version that ships in

reference/7.4/PSReadLine/About/about_PSReadLine.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: PSReadLine provides an improved command-line editing experience in the PowerShell console.
33
Locale: en-US
4-
ms.date: 11/14/2022
4+
ms.date: 07/18/2023
55
online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about PSReadLine
@@ -204,6 +204,11 @@ Invoke-WebRequest -Token xxx # Expr-value as argument to '-Token'.
204204
Get-ResultFromTwo -Secret1 (Get-Secret -Name blah -AsPlainText) -Secret2 sdv87ysdfayf798hfasd8f7ha # '-Secret2' has expr-value argument.
205205
```
206206

207+
If there are other commands you don't want written to the history files, you
208+
can use the **AddToHistoryHandler** parameter of the `Set-PSReadLineOption`
209+
cmdlet. For an example of how to use **AddToHistoryHandler**, see Example 7 of
210+
[Set-PSReadLineOption](/powershell/module/psreadline/set-psreadlineoption#example-7-use-historyhandler-to-filter-commands-added-to-history).
211+
207212
### PSReadLine release history
208213

209214
There have been many updates to PSReadLine since the version that ships in

0 commit comments

Comments
 (0)