From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4830 invoked from network); 9 Jul 2005 23:16:11 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Jul 2005 23:16:11 -0000 Received: (qmail 64812 invoked from network); 9 Jul 2005 23:16:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Jul 2005 23:16:05 -0000 Received: (qmail 20356 invoked by alias); 9 Jul 2005 23:15:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21412 Received: (qmail 20346 invoked from network); 9 Jul 2005 23:15:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Jul 2005 23:15:57 -0000 Received: (qmail 64219 invoked from network); 9 Jul 2005 23:15:57 -0000 Received: from lead.cat.pdx.edu (131.252.208.91) by a.mx.sunsite.dk with SMTP; 9 Jul 2005 23:15:53 -0000 Received: from ruby.cat.pdx.edu (ruby.cat.pdx.edu [131.252.208.85]) by lead.cat.pdx.edu (8.13.1/8.13.1) with ESMTP id j69NFmp5014816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 9 Jul 2005 16:15:48 -0700 (PDT) Received: from ruby.cat.pdx.edu (localhost.localdomain [127.0.0.1]) by ruby.cat.pdx.edu (8.13.1/8.12.10) with ESMTP id j69NFmIC005135 for ; Sat, 9 Jul 2005 16:15:48 -0700 Received: (from tspencer@localhost) by ruby.cat.pdx.edu (8.13.1/8.13.1/Submit) id j69NFlH4005134 for zsh-workers@sunsite.dk; Sat, 9 Jul 2005 16:15:47 -0700 Date: Sat, 9 Jul 2005 16:15:47 -0700 From: Travis Spencer To: zsh-workers@sunsite.dk Subject: PATCH: _pkg-config Message-ID: <20050709231547.GA27336@ruby.cat.pdx.edu> Reply-To: zsh-workers@sunsite.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: All mail clients sucks. This one just sucks less. X-TTS: . X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.0 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.0 Guess I get what I pay for from gmail today. Here is a patch without wrapped lines. Sorry for filling your mail spools w/ junk. --- /dev/null 2005-06-17 17:36:55.626688544 -0700 +++ Completion/Unix/Command/_pkg-config 2005-07-09 15:33:14.205038000 -0700 @@ -0,0 +1,57 @@ +#compdef pkg-config +# +# $Id$ +# +# Copyright (C) 2005 Travis L. Spencer +# ALL RIGHTS RESERVED +# +# See the file LICENCE in the root of the zsh distribution for +# licensing information. +# + +local arguments packages curcontext="$curcontext" stat line +declare -A opt_args + +arguments=( + "--modversion[print the version information of a given package]" + "--atleast-pkgconfig-version=[require given version of pkg-config]:minimum version" + "(- *)"{--help,-\?}"[display a help message]" + "(- *)--usage[display brief usage message]" + "--print-errors[cause errors to be printed]" + "--silence-errors[prevent the printing of errors]" + "--errors-to-stdout[print errors to stdout rather than stderr]" + "--cflags[prints the preprocessor and compile flags]" + "--cflags-only-I[output -I flags only]" + "--cflags-only-other[output cflags not covered by the cflags-only-I option]" + "--debug[show verbose debug information]" + "--libs[prints the link flags]" + "--libs-only-L[prints the -L and -R parts of \"--libs\"]" + "--libs-only-l[prints the -l part of \"--libs\"]" + "--libs-only-other[output other libs]" + "--list-all[list all known packages]" + "--variable=[return the value of the specified variable]:variable" + "--define-variable=[set the global value for a variable]:name value pair" + "--uninstalled[return successfully if any \"-uninstalled\" packages are being used and fails otherwise]" + "--exists[tests whether the package exists or not]" + "--atleast-version=[test whether the version is at least that of the specified value]:least value" + "--exact-version=[test whether the version is exactly that of the specified value]:exact value" + "--max-version=[test whether the version is no greater than some specific value]:max version" +# "--msvc-syntax[output linker flags in a form compatible with MSVC++ (Windows only)]" +# "--dont-define-prefix[disables automatic overiding of the variable \"prefix\" (Windows only)]" +# "--prefix-variable=[set the name of the variable \"prefix\" (Windows only)]:prefix value" + "*:package name:->package" +) + +_arguments -C $arguments + +if [[ -n $state ]] ; then + packages=( ${(f)"$((pkg-config --list-all | cut -d' ' -f1) 2>/dev/null)"} ) + compadd -a - packages +fi + +: <