3 ms·
While I tend to agree, a lot of commands also have pretty good aliases. For example `iwr` for Invoke-Web-Request. Also the full names are only expected to be
by anticrymactic 3y ago
While I tend to agree, a lot of commands also have pretty good aliases.
For example `iwr` for Invoke-Web-Request.
Also the full names are only expected to be used in scripts to maintain readability. No one types that in the console. Also ALL Parameters can be abbreviated if they are unique. If no other Parameter starts with R then -R is enough for -Recurse. (there are some quirks with this, but generally pretty intuitive)
And using select or for-each on actual types is magical, instead of grepping/shedding/parsing a maybe standardized string, with completely unsensical names (like grep or sed)
If you give bash and pwsh the same time and love, they will become both pretty ergonomic
- Maken 3y ago>Also ALL Parameters can be abbreviated if they are unique. If no other Parameter starts with R then -R is enough for -Recurse. (there are some quirks with this, but generally pretty intuitive) So, adding a new parameter starting with R to any command is a breaking change that will crash every script using it? Sounds like a terrible idea.
- Pet_Ant 3y ago> So, adding a new parameter starting with R to any command is a breaking change that will crash every script using it? In a script, write it out in full. When manually typing it’s okay to take shortcuts. There is always a tension between ergonomics and safety.
- hnlmorg 3y agoThat's really no different to the advice given for GNU coreutils: man grep | grep -- --recursive -r, --recursive
- tremon 3y agoAlso ALL Parameters can be abbreviated if they are unique They can also be abbreviated if they aren't unique, Powershell will just choose one for you. As an example: > Get-Content $file -r Will give you the error "Missing an argument for parameter 'ReadCount'", even though -Raw doesn't take a parameter.