split pkg-config completion
This commit is contained in:
parent
36e848a946
commit
803e0702b8
@ -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 &&
|
||||
|
29
contrib/pkg-config
Normal file
29
contrib/pkg-config
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user