Repository navigation
What's Changed
Features & Enhancements
- Wildcard support for
-Variablesand-Functions: Both parameters now accept string patterns with wildcards (e.g.,*,foo*,[ab]*) to dynamically import matching items from the caller's scope into the parallel scope.- Example:
-Variables *imports all non-built-in variables, or-Variables foo*imports only variables starting withfoo. - Example:
-Functions Get-*defines allGet-functions in the parallel scope.
- Example:
Note
When resolving variables via string patterns, variables whose values are of type ScriptBlock are silently ignored. Explicitly passing script blocks via hashtable like -Variables @{ foo = { ... } } retains its existing behavior.
- Support for multiple dictionaries in
-Variables: Updated parameter type fromHashtabletoIDictionary[], allowing multiple dictionaries to be passed as arguments. Duplicate keys are automatically ignored.
Behavior & Breaking Changes
- Terminating error for unmatched variables:
-Variablesnow throws a terminating error (ItemNotFoundException) if a specified variable name or wildcard pattern fails to match any variable in the caller's scope (aligning with the existing behavior of-Functions).
Refactoring
- Major internal refactoring to simplify code structure and improve overall readability.
Full Changelog: v1.2.5...v1.3.0