From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6794 invoked by alias); 12 Dec 2016 16:29:14 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22201 Received: (qmail 4373 invoked from network); 12 Dec 2016 16:29:14 -0000 X-Qmail-Scanner-Diagnostics: from mta03.eastlink.ca by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(24.224.136.9):SA:0(-3.7/5.0):. Processed in 3.478461 secs); 12 Dec 2016 16:29:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.eastlink.ca designates 24.224.136.9 as permitted sender) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=utf-8; format=flowed X-Authority-Analysis: v=2.2 cv=ZvqvEJzG c=1 sm=1 tr=0 a=xPWM5QW5oS+lNOfUWk9MeA==:117 a=xPWM5QW5oS+lNOfUWk9MeA==:17 a=IkcTkHD0fZMA:10 a=S8erb1_7jaan834noAMA:9 a=QEXdDO2ut3YA:10 X-EL-IP-NOAUTH: 24.207.97.144 Message-id: <584ED038.5060006@eastlink.ca> Date: Mon, 12 Dec 2016 08:28:40 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 To: Daniel Shahaf Cc: zsh-users@zsh.org Subject: Re: zsh-5.2-test-3 References: <20161209095729.2033b5be@pwslap01u.europe.root.pri> <20161209195457.27e43234@ntlworld.com> <584CB4EF.6070904@eastlink.ca> <584CCC14.10701@eastlink.ca> <20161211171559.322b58fc@ntlworld.com> <584D9809.4070805@eastlink.ca> <161211112327.ZM30304@torch.brasslantern.com> <584DB4BA.4050802@eastlink.ca> <161211154559.ZM30830@torch.brasslantern.com> <584DF7A1.6010906__17132.6343705461$1481504750$gmane$org@eastlink.ca> <20161212083742.GA11457@fujitsu.shahaf.local2> In-reply-to: <20161212083742.GA11457@fujitsu.shahaf.local2> On 12/12/2016 12:37 AM, Daniel Shahaf wrote: > Two optiosn: > > 1) Use regular expressions. Assuming your $PAGER is 'less': > > man zshall > /^ *test > [that's slash, caret, space, asterisk, etc — type it exactly so] > > will find instance of 'test' on beginning of line, only. Then `n' > to go to the next match. Bloody marvelous, I had no idea we were allowed to use those tricks inside man. But as above still has a few bad hits, whereas: /^ (seven spaces) test ... has only one bad hit, but what an improvement. So I take it that 'run-help' can't magically whisk us down to the command itself? I had supposed that there could be some functionality built into man that might make that possible (hidden tags or something), but if it's just text as seen then of course that won't be happening. I wonder if some wiz could find a way? I know that the rules for man are now written in stone, but if in, say, zshbuiltins all the command headings looked like: ~test [ arg ... ... or something, then you could always search for " ~test " thus eliminating any plain text uses of the word. I'll experiment with your other ideas a bit later. Thanks Daniel. You know, the above is one of those little things that no adept would bother to mention because it so obvious once you know it, but when you don't know it, life is that much nastier. BTW, why would run-help alias to man by default? We already have man, so who need another way of running it? Wouldn't the changes Bart mentioned be the natural default for a zsh specific command? I'd sure have appreciated it.