Say I make a typo on the command line:
whih foo
Powershell returns:
whih : The term 'whih' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ whih mocha
+ ~~~~
+ CategoryInfo : ObjectNotFound: (whih:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
The long message is useful for scripts, but for interactive shell use, I'd like to wrap it with something shorter, like:
'whih' isn't a cmdlet, function, script file, or operable program.
Can I wrap the error and change it to something shorter?