- make installation of RPM functions a compound statement

This commit is contained in:
ianmacd 2002-04-29 18:58:39 +00:00
parent 6b5abdf0c6
commit da63d5a592

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05a # bash_completion - some programmable completion functions for bash 2.05a
# #
# $Id: bash_completion,v 1.288 2002/04/29 20:36:04 ianmacd Exp $ # $Id: bash_completion,v 1.289 2002/04/29 20:58:39 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -948,7 +948,7 @@ _cvs()
} }
[ "$have" ] && complete -F _cvs $default cvs [ "$have" ] && complete -F _cvs $default cvs
have rpm && have rpm && {
# helper functions for rpm completion # helper functions for rpm completion
# #
rpm_installed_packages() rpm_installed_packages()
@ -1188,7 +1188,8 @@ _rpm()
return 0 return 0
} }
[ "$have" ] && complete -F _rpm $filenames rpm rpmbuild complete -F _rpm $filenames rpm rpmbuild
}
# Debian Linux apt-get(8) completion. # Debian Linux apt-get(8) completion.
# #
@ -2106,7 +2107,7 @@ _gdb()
COMPREPLY=( ${COMPREPLY[@]} $( ps ahx | sed -e 's#[]\[()]##g' |\ COMPREPLY=( ${COMPREPLY[@]} $( ps ahx | sed -e 's#[]\[()]##g' |\
awk '{p=$5;sub("^.*/","",p); \ awk '{p=$5;sub("^.*/","",p); \
if (p ~ /^'$prev'/) print $1}' | \ if (p ~ /^'$prev'/) print $1}' | \
sed -e 's#^.*/##' )) sed -e 's#^.*/##' ) )
fi fi
} }
[ $have ] && complete -F _gdb $default gdb [ $have ] && complete -F _gdb $default gdb
@ -2192,7 +2193,7 @@ _createdb()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-D -T -E -h -p -U -W -e -q \ COMPREPLY=( $( compgen -W '-D -T -E -h -p -U -W -e -q \
--location= --template= --encoding= --host= --port= \ --location= --template= --encoding= --host= --port= \
--username= --password --echo --quiet --help' -- $cur ) ) --username= --password --echo --quiet --help' -- $cur ))
else else
_pg_databases _pg_databases
fi fi