zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _pkg-config
@ 2005-07-09 22:53 Travis Spencer
  2005-07-09 23:15 ` Travis Spencer
  2005-08-12  6:39 ` Travis Spencer
  0 siblings, 2 replies; 4+ messages in thread
From: Travis Spencer @ 2005-07-09 22:53 UTC (permalink / raw)
  To: zsh-workers

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="$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"
+      "*: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
+
+: <<EMACS_LOCAL_VARIABLES
+Local Variables:
+mode: shell-script
+mode: flyspell-prog
+End:
+EMACS_LOCAL_VARIABLES


^ permalink raw reply	[flat|nested] 4+ messages in thread

* PATCH: _pkg-config
  2005-07-09 22:53 PATCH: _pkg-config Travis Spencer
@ 2005-07-09 23:15 ` Travis Spencer
  2005-08-12  6:39 ` Travis Spencer
  1 sibling, 0 replies; 4+ messages in thread
From: Travis Spencer @ 2005-07-09 23:15 UTC (permalink / raw)
  To: zsh-workers

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
+
+: <<EMACS_LOCAL_VARIABLES
+Local Variables:
+mode: shell-script
+mode: flyspell-prog
+End:
+EMACS_LOCAL_VARIABLES


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: _pkg-config
  2005-07-09 22:53 PATCH: _pkg-config Travis Spencer
  2005-07-09 23:15 ` Travis Spencer
@ 2005-08-12  6:39 ` Travis Spencer
  2005-08-12 10:05   ` Peter Stephenson
  1 sibling, 1 reply; 4+ messages in thread
From: Travis Spencer @ 2005-08-12  6:39 UTC (permalink / raw)
  To: zsh-workers

On 7/9/05, Travis Spencer <travislspencer@gmail.com> wrote:
> Here is a patch to add completion for the UNIX version of pkg-config.

Was there something wrong with this patch?  I've been using it now for
a month or so, and it is working fine for me.  If it is broken in some
way or needs improvement before it can be committed, please let me
know, and I'll fix it.

-- 

Regards,

Travis Spencer


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: _pkg-config
  2005-08-12  6:39 ` Travis Spencer
@ 2005-08-12 10:05   ` Peter Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2005-08-12 10:05 UTC (permalink / raw)
  To: Zsh hackers list

Travis Spencer <travislspencer@gmail.com> wrote:
> On 7/9/05, Travis Spencer <travislspencer@gmail.com> wrote:
> > Here is a patch to add completion for the UNIX version of pkg-config.
> 
> Was there something wrong with this patch?  I've been using it now for
> a month or so, and it is working fine for me.  If it is broken in some
> way or needs improvement before it can be committed, please let me
> know, and I'll fix it.

I've added it.  I don't know which distribution pkg-config applies to, so I
didn't know who was responsible for it.

pws


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-12 10:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-09 22:53 PATCH: _pkg-config Travis Spencer
2005-07-09 23:15 ` Travis Spencer
2005-08-12  6:39 ` Travis Spencer
2005-08-12 10:05   ` Peter Stephenson

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).