News for hackers. Stuff that matters.
Re:What's the one Linux command you wish you knew years ago? by pyre on Sunday November 20, 2011 @05:34AM (#3257813)
How would you make the bash manpage short and to the point, considering the complexity that it implements?
Re:What's the one Linux command you wish you knew years ago? by p9idf on Sunday November 20, 2011 @06:31AM (#3257882)
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.

Re:What's the one Linux command you wish you knew years ago? by dexen on Sunday November 20, 2011 @07:57AM (#3257997)

  $ 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/ Manpage at http://swtch.com/plan9port/man/man1/rc.html
Re:What's the one Linux command you wish you knew years ago? by throwaway64 on Sunday November 20, 2011 @01:46PM (#3258694)
i believe the p9 in his name is short for "plan 9" :)
Re:What's the one Linux command you wish you knew years ago? by pyre on Monday November 21, 2011 @02:15AM (#3260311)
Responding 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.
Re:What's the one Linux command you wish you knew years ago? by bostonvaulter2 on Sunday November 20, 2011 @02:09PM (#3258753)
I wish there was an easy way to get info about builtin commands. So things like man bash-disown would work (similar to git).
Re:What's the one Linux command you wish you knew years ago? by umbramei on Sunday November 20, 2011 @03:07PM (#3258887)
The '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').
Re:What's the one Linux command you wish you knew years ago? by bostonvaulter2 on Sunday November 20, 2011 @11:35PM (#3259993)
Yeah, but it often isn't as long as a real man page. Plus for some reason zsh doesn't have it!
Re:What's the one Linux command you wish you knew years ago? by super_mario on Monday November 21, 2011 @08:38AM (#3261032)
There'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.

Re:What's the one Linux command you wish you knew years ago? by icebraining on Sunday November 20, 2011 @06:41AM (#3257894)
While it doesn't fix the issue, zsh's man page is divided into different sections, which at least alleviates it.
Re:What's the one Linux command you wish you knew years ago? by pilif on Sunday November 20, 2011 @08:31AM (#3258051)
And zsh has the user-friendly users 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.

Re:What's the one Linux command you wish you knew years ago? by gnosis on Sunday November 20, 2011 @02:01PM (#3258732)
The 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.