summaryrefslogtreecommitdiff
path: root/completions/apt-build
diff options
context:
space:
mode:
authorDavid Paleino <dapal@debian.org>2011-11-03 12:32:52 +0100
committerDavid Paleino <dapal@debian.org>2011-11-03 12:32:52 +0100
commit2c8171c38d87ddef31c92a76547d3fdf773a1337 (patch)
tree5e720d5a06ead72ed55454bf6647a712a761ed91 /completions/apt-build
parent9920a8faedf704420571d8072ccab27e9dac40ba (diff)
downloadbash-completion-2c8171c38d87ddef31c92a76547d3fdf773a1337.tar.gz
Imported Upstream version 1.90upstream/1.90
Diffstat (limited to 'completions/apt-build')
-rw-r--r--completions/apt-build25
1 files changed, 9 insertions, 16 deletions
diff --git a/completions/apt-build b/completions/apt-build
index d875a986..aa78b230 100644
--- a/completions/apt-build
+++ b/completions/apt-build
@@ -1,16 +1,14 @@
-# Debian apt-build(1) completion.
+# Debian apt-build(1) completion -*- shell-script -*-
-have apt-build &&
_apt_build()
{
- local cur prev special i
+ local cur prev words cword
+ _init_completion || return
- COMPREPLY=()
- _get_comp_words_by_ref cur prev
-
- for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
- if [[ ${COMP_WORDS[i]} == @(install|remove|source|info|clean) ]]; then
- special=${COMP_WORDS[i]}
+ local special i
+ for (( i=0; i < ${#words[@]}-1; i++ )); do
+ if [[ ${words[i]} == @(install|remove|source|info|clean) ]]; then
+ special=${words[i]}
fi
done
@@ -21,7 +19,8 @@ _apt_build()
return 0
;;
remove)
- COMPREPLY=( $( _comp_dpkg_installed_packages "$cur" ) )
+ COMPREPLY=( \
+ $( _xfunc dpkg _comp_dpkg_installed_packages "$cur" ) )
return 0
;;
*)
@@ -57,10 +56,4 @@ _apt_build()
} &&
complete -F _apt_build apt-build
-# Local variables:
-# mode: shell-script
-# sh-basic-offset: 4
-# sh-indent-comment: t
-# indent-tabs-mode: nil
-# End:
# ex: ts=4 sw=4 et filetype=sh