Skip to content

Commit 432df06

Browse files
committed
Rename AutomaticallyWritePowerShellTipOption to WritePowerShellTipCondition
1 parent 145851e commit 432df06

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

ReadMe.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,19 @@ Possible values for the `-AutomaticallyWritePowerShellTip` parameter are `Never`
144144
Tips will only be automatically shown in interactive PowerShell sessions.
145145
This prevents them from appearing unexpectedly when running scripts or other automated processes.
146146

147-
#### Write only unshown tips
147+
#### Do not show the same tips twice
148148

149-
By default, tiPS will cycle through all available tips.
150-
If you prefer to only see tips that you haven't shown before, you can configure tiPS to only show unshown tips by running:
149+
By default, tiPS will cycle through all available tips, so once all tips have been shown it will restart and display them again.
150+
If you prefer to only see tips that haven't been shown before, you can configure tiPS to only show unshown tips by running:
151151

152152
```powershell
153-
Set-TiPSConfiguration -AutomaticallyWritePowerShellTipOption OnlyWriteUnshownTips
153+
Set-TiPSConfiguration -WritePowerShellTipCondition OnlyWriteUnshownTips
154154
```
155155

156-
Possible values for the `-AutomaticallyWritePowerShellTipOption` parameter are `CycleThroughTips` (default) and `OnlyWriteUnshownTips`.
156+
Possible values for the `-WritePowerShellTipCondition` parameter are `CycleThroughTips` (default) and `OnlyWriteUnshownTips`.
157157

158158
When `OnlyWriteUnshownTips` is used, tiPS will only automatically display a tip if there are tips that have not been shown yet.
159-
Once all tips have been shown, no more tips will be automatically displayed until new tips are added to the module (typically by updating the module).
159+
Once all tips have been shown, no more tips will be displayed until new tips are added (by updating the module).
160160

161161
### ⬆️ Automatic updates
162162

src/tiPS/Public/Set-TiPSConfiguration.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ function Set-TiPSConfiguration
2424
Whether to automatically write a PowerShell tip at session startup.
2525
Valid values are Never, EverySession, Daily, Weekly, Biweekly, and Monthly. Default is Never.
2626
27-
.PARAMETER AutomaticallyWritePowerShellTipOption
27+
.PARAMETER WritePowerShellTipCondition
2828
Controls how tips are selected when automatically showing tips.
2929
Valid values are CycleThroughTips (default) and OnlyWriteUnshownTips.
30-
OnlyWriteUnshownTips will only show tips that have not been shown yet.
30+
OnlyWriteUnshownTips will only show tips that have not been shown before.
3131
3232
.PARAMETER TipRetrievalOrder
3333
The order in which to retrieve PowerShell tips.
@@ -67,7 +67,7 @@ function Set-TiPSConfiguration
6767
Set the tiPS configuration to retrieve PowerShell tips in random order.
6868
6969
.EXAMPLE
70-
Set-TiPSConfiguration -AutomaticallyWritePowerShellTip Daily -AutomaticallyWritePowerShellTipOption OnlyWriteUnshownTips
70+
Set-TiPSConfiguration -AutomaticallyWritePowerShellTip Daily -WritePowerShellTipCondition OnlyWriteUnshownTips
7171
7272
Set the tiPS configuration to automatically write a PowerShell tip every day, but only if there are tips that have not been shown yet.
7373
#>
@@ -86,7 +86,7 @@ function Set-TiPSConfiguration
8686
[tiPS.WritePowerShellTipCadence] $AutomaticallyWritePowerShellTip = [tiPS.WritePowerShellTipCadence]::Never,
8787

8888
[Parameter(Mandatory = $false, ParameterSetName = 'PartialConfiguration', ValueFromPipelineByPropertyName = $true)]
89-
[tiPS.WritePowerShellTipConditions] $AutomaticallyWritePowerShellTipOption = [tiPS.WritePowerShellTipConditions]::CycleThroughTips,
89+
[tiPS.WritePowerShellTipConditions] $WritePowerShellTipCondition = [tiPS.WritePowerShellTipConditions]::CycleThroughTips,
9090

9191
[Parameter(Mandatory = $false, ParameterSetName = 'PartialConfiguration', ValueFromPipelineByPropertyName = $true)]
9292
[Alias('TipOrder')]
@@ -131,12 +131,12 @@ function Set-TiPSConfiguration
131131
}
132132
}
133133

134-
# If the AutomaticallyWritePowerShellTipOption parameter is passed in, set it.
135-
if ($PSBoundParameters.ContainsKey('AutomaticallyWritePowerShellTipOption'))
134+
# If the WritePowerShellTipCondition parameter is passed in, set it.
135+
if ($PSBoundParameters.ContainsKey('WritePowerShellTipCondition'))
136136
{
137137
if ($PSCmdlet.ShouldProcess('tiPS configuration WritePowerShellTipCondition property', 'Set'))
138138
{
139-
$script:TiPSConfiguration.WritePowerShellTipCondition = $AutomaticallyWritePowerShellTipOption
139+
$script:TiPSConfiguration.WritePowerShellTipCondition = $WritePowerShellTipCondition
140140
}
141141
}
142142

0 commit comments

Comments
 (0)