From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23994 invoked from network); 6 Jun 2009 05:54:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 6 Jun 2009 05:54:09 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 92598 invoked from network); 6 Jun 2009 05:54:02 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Jun 2009 05:54:02 -0000 Received: (qmail 2674 invoked by alias); 6 Jun 2009 05:53:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27038 Received: (qmail 2648 invoked from network); 6 Jun 2009 05:53:51 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 6 Jun 2009 05:53:51 -0000 Received: from vms173015pub.verizon.net (vms173015pub.verizon.net [206.46.173.15]) by bifrost.dotsrc.org (Postfix) with ESMTP id 90E868030800 for ; Sat, 6 Jun 2009 07:53:47 +0200 (CEST) Received: from torch.brasslantern.com ([96.249.201.13]) by vms173015.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KKS00AZLZ175CZ4@vms173015.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 06 Jun 2009 00:53:36 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id n565rUoO000553 for ; Fri, 05 Jun 2009 22:53:31 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n565rUCb000552 for zsh-workers@sunsite.dk; Fri, 05 Jun 2009 22:53:30 -0700 From: Bart Schaefer Message-id: <090605225330.ZM551@torch.brasslantern.com> Date: Fri, 05 Jun 2009 22:53:30 -0700 In-reply-to: Comments: In reply to "Jun T." "Re: run-help's man arguments" (Jun 6, 12:52pm) References: <2161.1244200252@csr.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@sunsite.dk Subject: Re: run-help's man arguments MIME-version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.94.2/9434/Sat Jun 6 04:10:47 2009 on bifrost X-Virus-Status: Clean On Jun 6, 12:52pm, Jun T. wrote: } Subject: Re: run-help's man arguments } } I'm not familiar with zsh internals, but I think ESC-h (in the default } bindings) is bound to the ZLE widget 'run-help' which calls the } function "run-help" as "run-help $1". You have a point there. PWS, how did you manage to get run-help to pass the entire locate command line to "man $@:t"? The only time the whole command line is obtained is when there's a function or alias named (in this example) "run-help-locate". The only OTHER time multiple arguments are in $@ is when $1 is quoted so the command is re-applied to ${(Q)1}, but in that case $@ is the output from "whence", not the original command line. } So "man $@:t" in the function is equivalent to "man $1:t" if called } from the widget. True except in the second of those latter two cases. } I believe most people use the run-help function via key binding, but } there is a possibility that someone use it by explicitly typing it. Or } by "alias m=run-help" and "m history", "m 3 printf" etc. That's the sort of "against the spirit" and "well-hidden" behavior to which PWS referred. Also note that "m 3 printf" will produce a bunch of errors about not finding "3" before it gets around to running "man", so it's not a particularly good use of run-help.