From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21972 invoked from network); 9 Jul 2005 22:53:31 -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 22:53:31 -0000 Received: (qmail 56645 invoked from network); 9 Jul 2005 22:53:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Jul 2005 22:53:23 -0000 Received: (qmail 18319 invoked by alias); 9 Jul 2005 22:53:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21411 Received: (qmail 18308 invoked from network); 9 Jul 2005 22:53:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Jul 2005 22:53:19 -0000 Received: (qmail 56427 invoked from network); 9 Jul 2005 22:53:19 -0000 Received: from wproxy.gmail.com (64.233.184.193) by a.mx.sunsite.dk with SMTP; 9 Jul 2005 22:53:15 -0000 Received: by wproxy.gmail.com with SMTP id i7so683283wra for ; Sat, 09 Jul 2005 15:53:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=IqyGd8VK4KCrGzW0QotuoCP8hue477l+koRgOtRLo2O7vs56nCJORJwQYeQgVE6SVJB2fr4f4GG9OJQ/4TsaF51tIkPGw2vKtWUIJtbU7O5LBUMfTE6yo9nOjcETo0UVIRoGdAO/SpsXGT6PY31U/uiFdoAGVLPBy+QfOjspE/k= Received: by 10.54.82.19 with SMTP id f19mr2687767wrb; Sat, 09 Jul 2005 15:53:13 -0700 (PDT) Received: by 10.54.128.12 with HTTP; Sat, 9 Jul 2005 15:53:13 -0700 (PDT) Message-ID: Date: Sat, 9 Jul 2005 15:53:13 -0700 From: Travis Spencer Reply-To: Travis Spencer To: zsh-workers@sunsite.dk Subject: PATCH: _pkg-config Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=AWL,BAYES_00,RCVD_BY_IP autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 Here is a patch to add completion for the UNIX version of pkg-config. --- /dev/null 1994-07-17 16:46:18.000000000 -0700 +++ Completion/Unix/Command/_pkg-config 2005-07-09 15:45:20.000000000 -0700 @@ -0,0 +1,54 @@ +#compdef pkg-config +# +# $Id: _pkg-config,v 1.1 2005/07/09 22:39:31 tspencer Exp $ +# +# 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=3D"$curcontext" stat line +declare -A opt_args + +arguments=3D( + "--modversion[print the version information of a given package]" + "--atleast-pkgconfig-version=3D[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=3D[return the value of the specified variable]:variable" + "--define-variable=3D[set the global value for a variable]:name valu= e pair" + "--uninstalled[return successfully if any \"-uninstalled\" packages are being used and fails otherwise]" + "--exists[tests whether the package exists or not]" + "--atleast-version=3D[test whether the version is at least that of the specified value]:least value" + "--exact-version=3D[test whether the version is exactly that of the specified value]:exact value" + "--max-version=3D[test whether the version is no greater than some specific value]:max version" + "*:package name:->package" +) + +_arguments -C $arguments + +if [[ -n $state ]] ; then + packages=3D( ${(f)"$((pkg-config --list-all | cut -d' ' -f1) 2>/dev/nu= ll)"} ) + compadd -a - packages +fi + +: <