From fd25b24df6b4f098944c4994195d3894a27a8208 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 31 May 2000 09:38:25 +0000 Subject: use compadd -[ak] (11549) --- Completion/User/_perl_builtin_funcs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Completion/User/_perl_builtin_funcs') diff --git a/Completion/User/_perl_builtin_funcs b/Completion/User/_perl_builtin_funcs index a8facda08..f5538c9e4 100644 --- a/Completion/User/_perl_builtin_funcs +++ b/Completion/User/_perl_builtin_funcs @@ -12,13 +12,13 @@ if [[ ${+_perl_builtin_funcs} -eq 0 ]]; then typeset -agU _perl_builtin_funcs local perlfunc - if perlfunc=`man -w perlfunc 2>&1`; then + if [[ -n "${perlfunc:=$(man -w perlfunc 2>/dev/null; print -l ${^manpath}/man1/perlfunc.1(N) {/usr/man,/usr/local/man}/man1/perlfunc.1(N))}" ]]; then _perl_builtin_funcs=( `perl -lne ' $in_funcs++, next if /Alphabetical/; \ next unless $in_funcs; \ if (/^\.Ip "(\w+)/) { \ print $1 unless $func{$1}; $func{$1}++ \ - }' $perlfunc` + }' $=perlfunc` ) else echo "Couldn't find perlfunc man page; giving up." @@ -26,4 +26,6 @@ if [[ ${+_perl_builtin_funcs} -eq 0 ]]; then fi fi -compadd - $_perl_builtin_funcs +local expl + +_wanted functions expl 'Perl built-in functions' compadd -a _perl_builtin_funcs -- cgit 1.4.1