3 ms·
"A system composed of a zillion tiny modules is itself a pile of mud" Having so many args to `ls' might be an overkill, but I certainly don't want to combine f
by guard-of-terra 11y ago
"A system composed of a zillion tiny modules is itself a pile of mud"
Having so many args to `ls' might be an overkill, but I certainly don't want to combine four programs to get full coloured sorted listing of current directory.
- icebraining 11y agoWhy not, if you can combine them permanently using a shell script?
- guard-of-terra 11y agoI won't be doing that. And if someone else does that for me, I've suddently got 400 (n^2) aliases that I can't reason about.
- icebraining 11y agoI wouldn't say you need 400 aliases. You'd only need aliases for the commonly typed pattern, not for any possible combination you might ever use.
- wz1000 11y agoMany shells already come with a few default aliases that call ls with different arguments. Your "four programs" can be combined in a simple alias.
- Dewie3 11y agoOne solution is to optimize shell programming for terseness, since it has to be so interactive. Then you can sacrifice this Unix rule in the name of terseness and get commands that are nice and simple to write and good enough for 90% of uses-cases, but perhaps bloated and not as strictly composable as the Unix philosophy would like. Then these commands can be implemented by simple compositions of other commands that are a bit more lean and verbose, and so probably won't be used much for shell programming. A nice bonus is that you can answer "what is `ls -m`?" by referring to an alias of something simple like first using a command that outputs a list of file names which is composed with a formatting command.