diff --git a/Posh.types.ps1xml b/Posh.types.ps1xml index 348164a..48e42f4 100644 --- a/Posh.types.ps1xml +++ b/Posh.types.ps1xml @@ -2239,6 +2239,18 @@ $posh.ExecutionContext.SessionState.PSVariable.Set("function:$($this.FunctionNam Tests Test + + Tips + Tip + + + Trick + Tip + + + Tricks + Tip + Videos Video @@ -2402,6 +2414,42 @@ $this | Select-Object -Unique + + Tip + + <# +.SYNOPSIS + Get's a module's tips +.DESCRIPTION + Gets tips and tricks from a module. + + Any module can contain `*.tip(s)` or `*.trick(s)` files, of the extensions: + + * .md + * .txt + * .ps1 + * .psd1 + * .json + * .clixml + + The collection of tips can be accessed in a Module's .Tip(s) or .Trick(s) properties + +#> +if (-not $this.'.Tip') { + $tipCollection = + [PSCustomObject][Ordered]@{ + PSTypeName = 'Posh.ExtensionCollection' + Module = $posh + Path = $this.Path | Split-Path + CommandType = 'Posh.Tip.Command' + } + + $tipCollection.pstypenames.insert(0,'Posh.Tip.Collection') + $this | Add-Member NoteProperty '.Tip' $tipCollection -Force +} +$this.'.Tip' + + Video