3 ms·
Why wouldn't they just convert them to aliases instead of adding the warnings?
by brundolf 4y ago
Why wouldn't they just convert them to aliases instead of adding the warnings?
- hnlmorg 4y agoaliases aren't a global state. They're shell and profile specific (as there are plenty of instances where a profile isn't loaded). With `egrep` defined as a shell script, any process (even callers who are not shells) will have the same behavior. That doesn't mean the shell script is the best solution though. Personally I'd rather they be a symlink to `grep` and have grep check the name it's been invoked as, and if it's "egrep" (or "e" if you're just checking the first byte) then implicitly enable the -E flag. This is how FreeBSD works and it feels like a more elegant solution in my opinion.
- brundolf 4y agoSure, makes sense- so then I guess I'd amend my question to that: I can't see why they'd add the warning instead of just redirecting the command