From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15175 invoked from network); 14 May 2002 16:38:32 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 May 2002 16:38:32 -0000 Received: (qmail 19242 invoked by alias); 14 May 2002 16:38:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17160 Received: (qmail 19215 invoked from network); 14 May 2002 16:38:05 -0000 From: Borsenkow Andrej To: "'Zsh hackers list'" Subject: RE: PATCH: _info completion Date: Tue, 14 May 2002 20:37:57 +0400 Message-ID: <6134254DE87BD411908B00A0C99B044F02E89AA9@mowd019a.mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 In-Reply-To: <20020514162058.GA31151@logica.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 > > 4 lines of parameter substitution is daunting but it tries to parse > > three different line entry formats with on regexp and also account for > > subtle differences in formatting I have encountered. Suggestions how to > > simplify it are gratefully accepted :-) > > I'm impressed. I thought about doing this some while ago and decided > that it was just more hassle than it was worth, even with info -o. > I haven't yet tried to understand the substitution yet either. > Actually it is quite simple. It takes info -o - output, cuts off evrything after "--- Detailed Node Listing ---" (which sometimes has spaces around sometimes not) then gets all lines "* xxx" except "* Menu:" and then tries to extract node names and descriptions, where lines match one of * Node: (file)section. Description - top level dir * Node:: Description - normal menu * Node: section - index (I think listing sections for index entries makes sense; if not it can already be simplified :-) nothing really exciting. -andrej