diff --git a/modules/do-common/Functions/common.ps1 b/modules/do-common/Functions/common.ps1 index 1837a26..a0d97ea 100644 --- a/modules/do-common/Functions/common.ps1 +++ b/modules/do-common/Functions/common.ps1 @@ -589,6 +589,26 @@ function Get-LogMessage { <# .SYNOPSIS Get PSReadLine history. + +.PARAMETER Pattern +Regex pattern to filter history entries. +.PARAMETER Last +Number of last matching entries to return. Default is 30. +.PARAMETER First +Number of first matching entries to return. + +.EXAMPLE +Get-PSReadLineHistory -Pattern 'Connect-Az.*' -Last 10 +# get last 10 PSReadLine history entries matching 'Connect-Az.*' pattern + +.EXAMPLE +Get-PSReadLineHistory 'Connect-Az.*' 10 +# omit parameters as Pattern is mandatory and Last is default + +.EXAMPLE +Get-PSReadLineHistory -Pattern 'git' -First 5 +# get first 5 PSReadLine history entries matching 'git' pattern + #> function Get-PSReadLineHistory { [CmdletBinding(DefaultParameterSetName = 'last')] diff --git a/modules/do-common/do-common.psd1 b/modules/do-common/do-common.psd1 index e9088bf..40b6545 100644 --- a/modules/do-common/do-common.psd1 +++ b/modules/do-common/do-common.psd1 @@ -4,7 +4,7 @@ RootModule = 'do-common.psm1' # Version number of this module. - ModuleVersion = '1.7.0' + ModuleVersion = '1.7.1' # Supported PSEditions CompatiblePSEditions = @('Core')