Introducing Packages
Major Overhaul with Breaking Changes split into packaged, default behavior moved into 'base' package each package has a json package description file with criteria for loading Modified Setup-Profile to refer to 'base' package path for auto loading moved Linux aliases and command to 'base.linux' package created 'docker' package to address docker supported systems modified Get-MyScripts, Edit-MyScripts and Reload-MyScripts accordingly. Dropped -System and sys.*, package json conditions will take care of it. Supplied command to create/edit package json files: - New-MyPackage - Add-PackageCondition - Set-MyPackage
This commit is contained in:
parent
80a488484b
commit
42b39f4e25
83 changed files with 505 additions and 130 deletions
21
base/profile.d/FunctionName.class.ps1
Normal file
21
base/profile.d/FunctionName.class.ps1
Normal file
|
@ -0,0 +1,21 @@
|
|||
class FunctionName { #: System.Management.Automation.IValidateSetValuesGenerator {
|
||||
static [string[]] _GetValidValues([string]$wordToComplete,[bool]$Strict) {
|
||||
$local:possibleValues = Get-Command -Type Function | Select-Object -ExpandProperty Name
|
||||
return $(Get-PossibleArguments -WordToComplete $wordToComplete -FullValueSet $possibleValues -Strict:$Strict );
|
||||
}
|
||||
static [String[]] _GetValidValues([string]$wordToComplete,[switch]$Strict) {
|
||||
return $(Get-PossibleArguments -WordToComplete $wordToComplete -FullValueSet $(Get-Command -Type Function | Select-Object -ExpandProperty Name) -Strict:$Strict)
|
||||
# $local:possibleValues =
|
||||
# if( $wordToComplete ) {
|
||||
# $possibleValues = $possibleValues | Where-Object { $_ -match $wordToComplete }
|
||||
# if( -not $strict -and ($wordToComplete -notin $possibleValues) ) {
|
||||
# $possibleValues = $( $wordToComplete; $possibleValues )
|
||||
# }
|
||||
# }
|
||||
# return $possibleValues
|
||||
}
|
||||
|
||||
[String[]] GetValidValues() {
|
||||
return [FunctionName]::_GetValidValues('',$true)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue