Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: run-help and \cmd (was: Simple Tip of the Day)



Vincent Lefevre wrote:
> On 2005-10-29 16:52:30 +0200, Christian Taylor wrote:
> > Another (default) binding that I really like is:
> > bindkey "^[h" run-help
> 
> BTW, I've just seen that it doesn't work when the command starts with
> a backslash (to avoid aliases). I assume that this is a bug.

You mean run-help on \ls doesn't work?  The shell doesn't know what the
run-help alias/function is going to do with the information so provides
exactly what it got.  Using a more sophisticated version of run-help would
do the trick; even turning "man $1" into "eval man $1" would work.
However, that's a little dangerous to have as the default.

(GNU man seems to accept "man '\ls'", as it happens.)

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com



Messages sorted by: Reverse Date, Date, Thread, Author