[Bash-completion-commits] [SCM] bash-completion branch, master, updated. eced7126a30bb62c49924f0b2dc61f0131317c00
Guillaume Rousse
guillomovitch at zarb.org
Sun May 17 20:13:22 UTC 2009
The following commit has been merged in the master branch:
commit 803e0702b88c0b7afdfe4f0b85a5489262b054fc
Author: Guillaume Rousse <guillomovitch at zarb.org>
Date: Sun May 17 22:07:02 2009 +0200
split pkg-config completion
diff --git a/bash_completion b/bash_completion
index d3c9ceb..f232582 100644
--- a/bash_completion
+++ b/bash_completion
@@ -6791,33 +6791,6 @@ have dhclient && _dhclient()
} &&
complete -F _dhclient dhclient
-# pkgconfig(1) completion
-#
-have pkg-config &&
-_pkg_config()
-{
- local cur
-
- COMPREPLY=()
- cur=`_get_cword`
-
- if [[ "$cur" == -* ]]; then
- # return list of available options
- COMPREPLY=( $( compgen -W '-version --modversion \
- --atleast-pkgconfig-version= --libs --libs-only-l \
- --libs-only-other --libs-only-L --cflags \
- --cflags-only-I --cflags-only-other --variable= \
- --define-variable= --exists --uninstalled \
- --atleast-version= --exact-version= --max-version= \
- --list-all --debug --print-errors --silence-errors \
- --errors-to-stdout -? --help --usage' -- $cur))
- else
- COMPREPLY=( $( compgen -W "$( pkg-config --list-all \
- 2>/dev/null | awk '{print $1}' )" -- $cur ) )
- fi
-} &&
-complete -F _pkg_config pkg-config
-
# id(1) completion
#
have id &&
diff --git a/contrib/pkg-config b/contrib/pkg-config
new file mode 100644
index 0000000..e9ac869
--- /dev/null
+++ b/contrib/pkg-config
@@ -0,0 +1,29 @@
+# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
+# ex: ts=8 sw=8 noet filetype=sh
+#
+# bash completion for pkgconfig
+
+have pkg-config &&
+_pkg_config()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ # return list of available options
+ COMPREPLY=( $( compgen -W '-version --modversion \
+ --atleast-pkgconfig-version= --libs --libs-only-l \
+ --libs-only-other --libs-only-L --cflags \
+ --cflags-only-I --cflags-only-other --variable= \
+ --define-variable= --exists --uninstalled \
+ --atleast-version= --exact-version= --max-version= \
+ --list-all --debug --print-errors --silence-errors \
+ --errors-to-stdout -? --help --usage' -- $cur))
+ else
+ COMPREPLY=( $( compgen -W "$( pkg-config --list-all \
+ 2>/dev/null | awk '{print $1}' )" -- $cur ) )
+ fi
+} &&
+complete -F _pkg_config pkg-config
--
bash-completion
More information about the Bash-completion-commits
mailing list