3 ms·
By 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 g
by p9idf 15y ago
By 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.