From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10028 invoked from network); 2 Mar 2005 08:13:45 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 Mar 2005 08:13:45 -0000 Received: (qmail 20933 invoked from network); 2 Mar 2005 08:13:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Mar 2005 08:13:38 -0000 Received: (qmail 11211 invoked by alias); 2 Mar 2005 08:13:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20907 Received: (qmail 11201 invoked from network); 2 Mar 2005 08:13:31 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Mar 2005 08:13:31 -0000 Received: (qmail 20598 invoked from network); 2 Mar 2005 08:13:31 -0000 Received: from wproxy.gmail.com (64.233.184.205) by a.mx.sunsite.dk with SMTP; 2 Mar 2005 08:13:27 -0000 Received: by wproxy.gmail.com with SMTP id 69so134537wri for ; Wed, 02 Mar 2005 00:13:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=NPUNiwUVgX1c1koKqmOE2lLGnuhvaJ4MxbQenVP0sE+vIA1YN37QHxoldOD3Ut8aM/To3CQHi+Mi1v166wMoEvCjf7DYijti75YNypAUTVt+cBtHBGwjaR4EwXUloD57Ny/qF6zJPPF+a0g/0Hy7pDFB69uBLEZE68fjbB9vEtw= Received: by 10.54.11.15 with SMTP id 15mr29704wrk; Wed, 02 Mar 2005 00:13:26 -0800 (PST) Received: by 10.54.39.23 with HTTP; Wed, 2 Mar 2005 00:13:25 -0800 (PST) Message-ID: <787bbe1c0503020013234b5de@mail.gmail.com> Date: Wed, 2 Mar 2005 09:13:25 +0100 From: =?UTF-8?Q?S=C5=82awek_=C5=BBak?= Reply-To: =?UTF-8?Q?S=C5=82awek_=C5=BBak?= To: Zsh Workers Subject: Fwd: Help command behavior with aliases In-Reply-To: <787bbe1c05022812417b32e471@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: <787bbe1c05022810143f45e673@mail.gmail.com> <1050228190035.ZM27013@candle.brasslantern.com> <787bbe1c05022812417b32e471@mail.gmail.com> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=BAYES_00,RCVD_BY_IP autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 Mistakenly sent in private mail to Bart. Can you help? /S ---------- Forwarded message ---------- From: S=C5=82awek =C5=BBak Date: Mon, 28 Feb 2005 21:41:35 +0100 Subject: Re: Help command behavior with aliases To: Bart Schaefer On Mon, 28 Feb 2005 19:00:35 +0000, Bart Schaefer wrote: > On Feb 28, 7:14pm, ( Text in unknown character set UTF-8 not shown ) wro= te: > } > } When aliasing a command and running it from CLI, help for the command > } (Escape-H) is called for alias expansion, like in: > } > } % portupgrade zsh (type Esc-H) > } > } > } Strange and unpleasant as well. Any reason to keep it this way? > > Suppose you have > > alias LL=3D'ls -lL' > > Do you want run-help to display the man page for "ls", or do you want it > to simply fail because there is no LL command? > > However, it's probably possible to rewrite the run-help function so that > it skips command prefixes (coproc, nice, time, etc.) in alias expansions > and displays the help for the following word instead. > Doh, You're right. I've got a friend aliasing vi to v. I should've thought of it. All the aliases I use indeed are just innocuous prefixes to standard commands, or options I like for the commands to save me some typing. Could you explain, how to change run-help behavior? As a side note, I used to like and use compctl in the old days of 3.x. Now the powerful-completion-engine NT seems to be the thing. I had an alias which let me use % stop apache this would run /usr/local/etc/rc.d/apache.sh stop, *and* complete apache grokking the whole path (two paths actually, /etc/rc.d and the above). Can I get the completion part easily now? Thanks for your swift response, /S