Functions/ActivateSciProfiles.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# =========================================================================== # ActivateSciProfileAutocompletion.ps1 ------------------------------------ # =========================================================================== # function ---------------------------------------------------------------- # --------------------------------------------------------------------------- function ActivateSciProfileAutocompletion { <# .DESCRIPTION Import PSPocs activating autocompletion for validating input of module functions. .OUTPUTS ScriptBlock. Scriptblock with using command. #> [CmdletBinding(PositionalBinding)] [OutputType([ScriptBlock])] Param() Process { $script_list = @( ActivateVirtualEnvAutocompletion ActivatePocsAutocompletion $(Get-Command $(Join-Path -Path $Module.ClassDir -ChildPath "ModuleValidation.ps1") | Select-Object -ExpandProperty ScriptBlock) ) return Join-ScriptBlock -Scripts $script_list } } # function ---------------------------------------------------------------- # --------------------------------------------------------------------------- function ValidateSciProfileProjectType { <# .DESCRIPTION Return values for the use of validating existing .OUTPUTS System.String[]. Virtual environments #> [CmdletBinding(PositionalBinding=$True)] [OutputType([System.String[]])] Param( [Parameter(Position=1, HelpMessage="Existing project type.")] [System.String] $Type="Project" ) Process{ return (Get-ProjectList -Unformatted | Where-Object { $_.Type -eq $Type } | Select-Object -ExpandProperty "Alias") } } |