diff --git a/Types/PSModuleInfo/Alias.psd1 b/Types/PSModuleInfo/Alias.psd1 new file mode 100644 index 000000000..2f9724316 --- /dev/null +++ b/Types/PSModuleInfo/Alias.psd1 @@ -0,0 +1,5 @@ +@{ + Extensions = 'Extension' + ExtendedCommand = 'Extension' + ExtendedCommands = 'Extension' +} \ No newline at end of file diff --git a/Types/PSModuleInfo/get_Extension.ps1 b/Types/PSModuleInfo/get_Extension.ps1 new file mode 100644 index 000000000..d4d33d117 --- /dev/null +++ b/Types/PSModuleInfo/get_Extension.ps1 @@ -0,0 +1,15 @@ +<# +.SYNOPSIS + Gets Extended Commands +.DESCRIPTION + Gets Extended Commands for this module +.EXAMPLE + (Get-Module PipeScript).Extensions +#> +if (-not $this.'.ExtendedCommands') { + Add-Member -InputObject $this -MemberType NoteProperty -Name '.Extensions' -Value @( + $this.FindExtensions() + $this.FindExtensions(($This | Split-Path)) + ) +} +$this.'.ExtendedCommands'