4 ms·
I enjoy Powershell as well, but the Basic-style command structure is a bit frustrating. Particularly when trying to achieve parity between a Windows "shell", a
by eamann 13y ago
I enjoy Powershell as well, but the Basic-style command structure is a bit frustrating. Particularly when trying to achieve parity between a Windows "shell", a Linux shell, and a Mac terminal "shell." Comma-delimited args in commands don't fit the bill there.
- 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?