Bug - Not A Bug CLI prefref command returns incorrect results for "walford"

See attached image for details. Basically, the regex for prefref performs as expected for the string "walfor", but fails in a spectacular way for the string "walford", returning seemingly-unrelated properties. I... don't even.

prefref_failure.PNG
 
You have "walford" aliased to something, right? Probably starting with "call ", in this case. Unalias it, or work around it.
 
We have seen this again and again and again over the years.

FWIW, I have no aliases. I know many people have them, and if it's good for them, great! But if you make an alias, you are 100% responsible for comprehending the issues and dealing with weirdness in your CLI.

Not that that has stopped literally dozens of people from making bug reports when they don't do that. ;)
 
Aliases are extremely literal. If you alias "pop" to "fold sneaky pete's leather jacket (collar popped)", then learn that fuzzy matching exists and try typing "fold pete jack pop" instead, the cli will interpret that as "fold pete jack fold sneaky pete's leather jacket (collar popped)" and fail, but "fold pete jack popp" works fine.

A good plan is to unalias anything you expect to type in any context other than calling the alias, as well as anything that might be a CLI or ASH command you don't know about. (I once had "case" aliased to "display put *". This caused quite a few problems until I realized what was going on.)
 
Alternatively, put %% at the end of every alias that doesn't already use %%. That will prevent the alias from expanding anywhere except start of line.
 
Back
Top