Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: Bug with _perl_builtin_funcs
- X-seq: zsh-workers 18468
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: Re: Bug with _perl_builtin_funcs
- Date: Thu, 24 Apr 2003 11:06:08 +0200
- In-reply-to: <1030423165343.ZM13391@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20030401151646.34142.qmail@xxxxxxxxxxxxxxxxxxxxxxx> <22800.1051093022@xxxxxxxxxxxxxxxxxx> <1030423165343.ZM13391@xxxxxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author