Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"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.




Many shells already come with a few default aliases that call ls with different arguments. Your "four programs" can be combined in a simple alias.


And what would you call an alias that gave you a coloured, sorted listing of the current directory?


lsc


Why not, if you can combine them permanently using a shell script?


I 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.


I 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.


One 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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: