I have a couple of questions about decisions which were made regarding defaults (or lack thereof).
Anybody know why Format-Table doesn't default to -AutoSize? Everybody I know always uses this setting... unless they forget. Then they go "Doh!" and reissue the command with -AutoSize.
The other decision that baffles me is why we need to add [cmdletbinding()] manually all the time. I can't recall a single script or function I've ever written where I didn't leverage this. Is there some reason for making it a manual addition?
Format-Table -AutoSize might be a good candidate for the $PSDefaultParameterValues preference variable. Here's a couple posts I wrote about it that will give your enough information to make -AutoSize the default: http://tommymaynard.com/?s=%24psdefaultparametervalues. Add this to your profiles, and it'll always be set.
The topic ‘A couple of questions about defaults (or lack thereof)’ is closed to new replies.