9 ms·
Great, excellent, fun. But, clearly, it should run 'ls' after doing its choo choo?
by benhalllondon 13y ago
Great, excellent, fun.
But, clearly, it should run 'ls' after doing its choo choo?
- rmk2 13y agoWell, this forces you to type 'ls' again, giving you another chance to see the awesome locomotive! ;)
- minos 13y agoOne could use a shell alias, a function or something similar for that.
- ricket 13y agoalias sl='sl;ls'
- cliffbean 13y agoThat is optimizing for the short term. "When I've run sl, I clearly wanted ls, so you should give me that (even if you also punish me)." Optimizing for the long term is also plausible. "Don't reward me for making mistakes (even if you also punish me) because it'll dilute my muscle-memory training, and I'll be more likely to make mistakes in the future." Neither of these is inherently more correct than the other. The long term has more uncertainty, but greater potential rewards. We just have to make a judgment call. I tend to favor the long-term approach for sl. I can't easily quantify how valuable my stricter muscle-memory training will be, but I can imagine the possibility of a significant upside if I actually become a more precise typer. Also, the worst-case downside just isn't that bad -- retyping ls just isn't that hard.
- philwelch 13y agoThe Unix philosophy is that a program should only do one thing. sl only does one thing.