- add some options to apt-build completion
(Patch by Rafael Sepúlveda <drs@gnulinux.org.mx>)
This commit is contained in:
parent
d1745551a9
commit
bc66fd073f
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05b
|
||||
#
|
||||
# $Id: bash_completion,v 1.412 2002/09/28 18:12:24 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.413 2002/09/28 18:33:12 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -1608,7 +1608,7 @@ complete -F _aptitude $default aptitude
|
||||
|
||||
# Debian apt-build(1) completion.
|
||||
#
|
||||
have apt-build &&
|
||||
#have apt-build &&
|
||||
_apt_build()
|
||||
{
|
||||
local cur prev special i
|
||||
@ -1618,13 +1618,14 @@ _apt_build()
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
for (( i=0; i < ${#COMP_WORDS}-1; i++ )); do
|
||||
if [[ ${COMP_WORDS[i]} == @(install|remove|source) ]]; then
|
||||
if [[ ${COMP_WORDS[i]} == @(install|remove|source|info|clean) ]]; then
|
||||
special=${COMP_WORDS[i]}
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$special" ]; then
|
||||
case $special in
|
||||
@(install|source))
|
||||
@(install|source|info))
|
||||
COMPREPLY=( $( apt-cache pkgnames $cur ) )
|
||||
return 0
|
||||
;;
|
||||
@ -1633,23 +1634,24 @@ _apt_build()
|
||||
$cur ) )
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ "$prev" = --patch ]]; then
|
||||
if [[ "$prev" == --@(patch|repository-dir) ]]; then
|
||||
_filedir
|
||||
return 0
|
||||
|
||||
elif [[ "$prev" = --patch-strip ]]; then
|
||||
elif [[ "$prev" == -@(*h|-@(patch-strip|build-@(dir|command)|help)) ]]; then
|
||||
return 0
|
||||
|
||||
#a little hand in this option will be helpful :)
|
||||
elif [[ "$prev" = --build-command ]]; then
|
||||
return 0
|
||||
|
||||
else
|
||||
COMPREPLY=( $( compgen -W "update upgrade install remove \
|
||||
source dist-upgrade clean \
|
||||
source dist-upgrade world clean info \
|
||||
--help --show-upgraded -u --build-dir \
|
||||
--repository-dir --build-only \
|
||||
--build-command --reinstall --rebuild \
|
||||
--remove-builddep --no-wrapper --purge \
|
||||
--reinstall --rebuild --remove-builddep \
|
||||
--no-wrapper --purge --build-command \
|
||||
--patch --patch-strip -p --yes -y \
|
||||
@ -1659,7 +1661,8 @@ _apt_build()
|
||||
|
||||
return 0
|
||||
}
|
||||
[ "$have" ] && complete -F _apt_build $filenames apt-build
|
||||
#[ "$have" ] && complete -F _apt_build $filenames apt-build
|
||||
complete -F _apt_build $filenames apt-build
|
||||
|
||||
# chsh(1) completion
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user