Re:Linux-flavored Windows
by eamann on Tuesday November 26, 2013 @10:34AM
(#6801888)
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.
[ Parent
| on HN ]
> 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?