aptitude: safe-upgrade accepts package name as parameters (Alioth: #313638, Debian: 673235)

Patch-by: Nicolas Le Cam <niko.lecam@gmail.com>
This commit is contained in:
Igor Murzov 2013-08-15 23:43:57 +04:00
parent a282d0254c
commit e91a45889f

View File

@ -26,7 +26,7 @@ _aptitude()
local special i local special i
for (( i=0; i < ${#words[@]}-1; i++ )); do for (( i=0; i < ${#words[@]}-1; i++ )); do
if [[ ${words[i]} == @(@(|re)install|@(|un)hold|@(|un)markauto|@(dist|full)-upgrade|download|show|forbid-version|purge|remove|changelog|why@(|-not)|keep@(|-all)|build-dep|@(add|remove)-user-tag|versions) ]]; then if [[ ${words[i]} == @(@(|re)install|@(|un)hold|@(|un)markauto|@(dist|full|safe)-upgrade|download|show|forbid-version|purge|remove|changelog|why@(|-not)|keep@(|-all)|build-dep|@(add|remove)-user-tag|versions) ]]; then
special=${words[i]} special=${words[i]}
fi fi
#exclude some mutually exclusive options #exclude some mutually exclusive options
@ -37,8 +37,8 @@ _aptitude()
if [[ -n "$special" ]]; then if [[ -n "$special" ]]; then
case $special in case $special in
install|hold|markauto|unmarkauto|dist-upgrade|full-upgrade| \ install|hold|markauto|unmarkauto|dist-upgrade|full-upgrade| \
download|show|changelog|why|why-not|build-dep|add-user-tag| \ safe-upgrade|download|show|changelog|why|why-not|build-dep| \
remove-user-tag|versions) add-user-tag|remove-user-tag|versions)
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) ) COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
return 0 return 0
;; ;;
@ -56,7 +56,7 @@ _aptitude()
case $prev in case $prev in
# don't complete anything if these options are found # don't complete anything if these options are found
autoclean|clean|forget-new|search|safe-upgrade|upgrade|update|keep-all) autoclean|clean|forget-new|search|upgrade|update|keep-all)
return 0 return 0
;; ;;
-S) -S)