4 ms·
How would you make the bash manpage short and to the point, considering the complexity that it implements?
by pyre 15y ago
How would you make the bash manpage short and to the point, considering the complexity that it implements?
- p9idf 15y agoBy reducing the needless complexity that it implements. The purpose of a Unix shell is to interpret a simple language wrapping syscalls so the user can easily give instructions to the kernel. There are several such shells whose source code is smaller than the bash manpage. 13 pages of the 80 page manual are devoted to readline and programmable completion. Readline and programmable completion could be removed from the shell, and their functional equivalents moved to a more logical place in the terminal emulator. Plan 9 does this, and it works well, and people seem to like it and the flexibility it gives. 24 pages are devoted to builtin commands, many of which are unnecessary duplicates of regular commands, and several unnecessary altogether. 3 pages are about weird parameter expansions, all of which can be done more intuitively with sed, except for the array one, which can be done with awk. And there are many smaller things as well, like biffing or arithmetic evaluation, which can be done with dc or whatever. You could try moving history out of the shell and into the terminal emulator as well.
- dexen 15y ago$ man bash | wc -l 5351 $ 9 man rc | wc -l 496 You may want to check out the `rc' shell from Plan 9 (carried over from latest UNICes). Simple, elegant. Available for linux via http://swtch.com/plan9port/ http://swtch.com/plan9port/ Manpage at http://swtch.com/plan9port/man/man1/rc.html http://swtch.com/plan9port/man/man1/rc.html
- throwaway64 15y agoi believe the p9 in his name is short for "plan 9" :)
- pyre 15y agoResponding that bash itself is too complex is skirting the question. The original post made it sound like the bash manpage was needlessly complex within the constraints of bash's current complexity.
- icebraining 15y agoWhile it doesn't fix the issue, zsh's man page is divided into different sections, which at least alleviates it.
- pilif 15y agoAnd zsh has the user-friendly users guide: http://zsh.sourceforge.net/Guide/ http://zsh.sourceforge.net/Guide/ This is how I learned unix shell back around 2000ish. Aside of giving an excellent insight into zsh, it also gives many good hints and notes about unix shells in general.
- gnosis 15y agoThe first two or three chapters of that guide are pretty good, but then it gets bogged down in obscure minutia to such a degree that you start to feel almost like you're just reading the zsh man pages again. The guide is in some serious need of a good editor to make it more concise and better organized. It also needs many more simple, practical examples. Unfortunately, it hasn't been updated since 2002, which also makes it a bit obsolete, since zsh development has been very active since then and zsh is now on to a new major version. Overall, the guide is a nice try, but zsh needs more and better documentation if its not going to overwhelm all but the most dedicated users.
- bostonvaulter2 15y agoI wish there was an easy way to get info about builtin commands. So things like man bash-disown would work (similar to git).
- umbramei 15y agoThe 'help' command is exactly what you're looking for -- e.g., 'help disown' will describe the 'disown' command. Definitely beats searching the entire bash man page for the command you want (which is what I did for far too long, until I found out about 'help').
- bostonvaulter2 15y agoYeah, but it often isn't as long as a real man page. Plus for some reason zsh doesn't have it!
- super_mario 15y agoThere's always google you know :D. The point is to know what to look for: $ help "*" will print out all shell built ins (list help for them). And if the short description is not enough, go google for each.