I don't find it ugly, just strange. It's optimized for interactive usage though from what I understand. I think of it mostly as calling .NET methods that all have named parameters:
myfunc -param1 this -param2 that
instead of:
myfunc(param1: this, param2: that);
I get the impression it's designed with the intent that you're supposed to type the dash, then hit Tab to get tab-completion in most cases. Same with the verb/noun syntax (I know I want to 'Get' something, so typing Get-<Tab> for the list of things is usually the thing to do). I do find it a bit difficult sometimes to think of an approprioate verb right off the top of my head (is it Get- or New- that I need?).
I'd also love to see the concept of proper namespaces in PowerShell; it seems really inconsistent right now (unless I've missed something). For example, type Show-Command and hit ENTER, then look at the different modules that are available. Some will express a 'namespace' by having it prepended to the noun (see for example, commands from the BitLocker module, their nouns all start with BitLocker) while others express no namespace at all (see for example commands from the 'Dism' module). For everyday use I've gone with the 'add the name to the noun' approach in my own scripts. That does mean I tend to use short namespace names though.
I've mentioned this in an older PowerShell-related thread here - MenuComplete is absolutely awesome and improves the PowerShell experience in the console. I actually think it should be the default. If you havent already, try these commands:
PowerShell is my full-time shell in Windows now (and it will be in Linux also when I get back into it); I rarely use CMD for anything and parsing text in bash just seems antiquated.
myfunc -param1 this -param2 that
instead of:
myfunc(param1: this, param2: that);
I get the impression it's designed with the intent that you're supposed to type the dash, then hit Tab to get tab-completion in most cases. Same with the verb/noun syntax (I know I want to 'Get' something, so typing Get-<Tab> for the list of things is usually the thing to do). I do find it a bit difficult sometimes to think of an approprioate verb right off the top of my head (is it Get- or New- that I need?).
I'd also love to see the concept of proper namespaces in PowerShell; it seems really inconsistent right now (unless I've missed something). For example, type Show-Command and hit ENTER, then look at the different modules that are available. Some will express a 'namespace' by having it prepended to the noun (see for example, commands from the BitLocker module, their nouns all start with BitLocker) while others express no namespace at all (see for example commands from the 'Dism' module). For everyday use I've gone with the 'add the name to the noun' approach in my own scripts. That does mean I tend to use short namespace names though.
I've mentioned this in an older PowerShell-related thread here - MenuComplete is absolutely awesome and improves the PowerShell experience in the console. I actually think it should be the default. If you havent already, try these commands:
Set-PSReadLineKeyHandler -key Tab -Function MenuComplete
Set-PSReadLineOption -ShowToolTips
PowerShell is my full-time shell in Windows now (and it will be in Linux also when I get back into it); I rarely use CMD for anything and parsing text in bash just seems antiquated.