summaryrefslogtreecommitdiffstats
path: root/completions/pkg-config
diff options
context:
space:
mode:
Diffstat (limited to 'completions/pkg-config')
-rw-r--r--completions/pkg-config24
1 files changed, 12 insertions, 12 deletions
diff --git a/completions/pkg-config b/completions/pkg-config
index b9db167..489f477 100644
--- a/completions/pkg-config
+++ b/completions/pkg-config
@@ -1,9 +1,9 @@
# bash completion for pkgconfig -*- shell-script -*-
-_pkg_config()
+_comp_cmd_pkg_config()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
case $prev in
--define-variable | --atleast-version | --atleast-pkgconfig-version | \
@@ -15,9 +15,9 @@ _pkg_config()
local word
for word in "${words[@]:1}"; do
if [[ $word != -* ]]; then
- COMPREPLY=($(compgen -W \
- '$("$1" $word --print-variables 2>/dev/null)' \
- -- "$cur"))
+ _comp_compgen_split -- "$(
+ "$1" "$word" --print-variables 2>/dev/null
+ )"
break
fi
done
@@ -29,17 +29,17 @@ _pkg_config()
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
else
- COMPREPLY=($(compgen -W "$($1 --list-all \
- 2>/dev/null | awk '{print $1}')" -- "$cur"))
- _filedir pc
+ _comp_compgen_split -- "$("$1" --list-all 2>/dev/null |
+ _comp_awk '{print $1}')"
+ _comp_compgen -a filedir pc
fi
} &&
- complete -F _pkg_config pkg-config
+ complete -F _comp_cmd_pkg_config pkg-config pkgconf
# ex: filetype=sh