Skip to content

Commit

Permalink
aptitude: safe-upgrade accepts package name as parameters (Alioth: #3…
Browse files Browse the repository at this point in the history
…13638, Debian: 673235)

Patch-by: Nicolas Le Cam <niko.lecam@gmail.com>
  • Loading branch information
GArik committed Aug 15, 2013
1 parent a282d02 commit e91a458
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions completions/aptitude
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _aptitude()

local special i
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]}
fi
#exclude some mutually exclusive options
Expand All @@ -37,8 +37,8 @@ _aptitude()
if [[ -n "$special" ]]; then
case $special in
install|hold|markauto|unmarkauto|dist-upgrade|full-upgrade| \
download|show|changelog|why|why-not|build-dep|add-user-tag| \
remove-user-tag|versions)
safe-upgrade|download|show|changelog|why|why-not|build-dep| \
add-user-tag|remove-user-tag|versions)
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
return 0
;;
Expand All @@ -56,7 +56,7 @@ _aptitude()

case $prev in
# 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
;;
-S)
Expand Down

0 comments on commit e91a458

Please sign in to comment.