3 ms·
> Comma-delimited args in commands Not quite sure what you mean.You don't need to use comma unless you explicitly want an array of values. So for example a rat
by shadowfox 13y ago
> Comma-delimited args in commands
Not quite sure what you mean.You don't need to use comma unless you explicitly want an array of values. So for example a rather simplistic cmdlet/function like this,
Function Foo([string] $text, [int] $count) {
#Produce repeated text
$text * $count
}
can be called in any of the following ways:
Foo "ab" 3 ---> "ababab"
Foo -text a -count 3 --> "ababab"
Foo -t a -c 3 ---> "ababab" [Automatically disambiguated]
And we are not even using features of cmdlets like parameter aliasing.
Maybe I understood your concern wrong?