zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: Re: Bug with _perl_builtin_funcs
Date: Thu, 24 Apr 2003 11:06:08 +0200	[thread overview]
Message-ID: <2298.1051175168@gmcs3.logica.co.uk> (raw)
In-Reply-To: <1030423165343.ZM13391@candle.brasslantern.com>

Bart wrote:
> On Apr 23, 12:17pm, Oliver Kiddle wrote:
> } Subject: PATCH: Re: Bug with _perl_builtin_funcs
> }
> } On 1 Apr, Felix Rosencrantz wrote:
> } > it parses the man page it assume it is plain text.  However, on RH
> } > the man page is compressed with gzip.
> } 
> } This should make it use bzip2 or gzip as appropriate.
> 
> Why not parse the output of "perldoc perlfunc" instead?

As I don't ever use perldoc, I was just looking for the minimal easy fix
and throwing in a case statement to run gzcat/bzcat/cat on a file seemed
easier than anything which would involve rewriting the parsing.

And it seemed to make sense that parsing troff source is easier than
the formatted output so I didn't think much about it. However, I just
looked at the perldoc man page and it seems that I can get POD source
by using perldoc -u (so _perldoc is clearly very minimal). That's nice
and easy to parse and yields this, much shorter function:

#autoload

local expl

: ${(A)_perl_builtin_funcs:=${(u)${${(M)${(f)"$(_call_program functions \
    perldoc -u perlfunc)"}:#\=item [a-z]*}#* }%%[^a-z]*}}

_wanted functions expl 'perl built-in function' compadd "$@" -a - \
    _perl_builtin_funcs


      reply	other threads:[~2003-04-24  9:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-01 15:16 Felix Rosencrantz
2003-04-23 10:17 ` PATCH: " Oliver Kiddle
2003-04-23 16:53   ` Bart Schaefer
2003-04-24  9:06     ` Oliver Kiddle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2298.1051175168@gmcs3.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).