One things I've missed in zsh coming from bash is the "help" command, which is handy for quickly looking up built-in shell commands.

$ help pwd
pwd: pwd [-LP]
     Print the name of the current working directory.

zsh has the zshbuiltins(1) man page, but it's tedious to find the documentation for the command you're interested in. sed to the rescue!

    man zshbuiltins | sed -ne "/^       $1 /,/^\$/{s/       //; p}"
Instead of help, zsh has a keyboard shortcut, M-h which takes the current command under the cursor and does run-help CMD on it. It even is smart enough to be able to show you the help for a command after a pipe!
Comment by Mon 26 Dec 2011 19:26:43 GMT

I moved from bash to zsh, and missed the "help" builtin. So I wrote an alias that called it. Then I figured out something better. I sometimes have to hit "n" one or more times to get to the line in the manual that I need.

help(){ #This function used to call the "bash" builtin. #bash -c "help $@"

#Better way: look it up in the man pages. I often look up "test" which doesn't give a usefull result,
#so I added that as a special case.
if ? $1 == "test" ; then
    man --pager="less -p'^CONDITIONAL EXPRESSIONS$'" zshall
    man --pager="less -p'^ *$@ '" zshall


Comment by Anonymous Wed 16 May 2012 14:20:01 BST