|
|
|
|
|
by WorldMaker
1659 days ago
|
|
In a reasonably modern terminal, tab completion makes it a lot less typing than it appears. The other thing is that idiomatic PowerShell takes a "Python perspective" that scripts are often read way more often than they are written and the best, idiomatic examples often use the most verbose forms of names to make things clearer to read. PowerShell has a very rich aliases system with many, much shorter names for almost everything (and the ability to define your own to your heart's desire; and the ability to list which aliases are active on a current system), and you absolutely can code golf PS1 commands down into very bash-like lines. Most PowerShell veterans tend to write extremely terse stuff at the REPL even when in scripts and online documentation they try to stick to the idiomatic verbosity for others that need to read the scripts and understand what they do (even sometimes themselves months or years later). |
|
Not only use of cmdlet aliases make shorter syntax but also:
- Shortening parameter names to unique prefix
- Use of parameter aliases
- Use of automatic pipeline property binder
In my experience achieving the same or shorter one-liners for the same task as with bash is typical.