Make 'aptitude show' work the same way as 'apt-cache show'. Fix from nerf

<j-andrieux@laposte.net>.
This commit is contained in:
ianmacd 2006-02-24 11:59:03 +00:00
parent a8474fe61a
commit acc76f1bb5

View File

@ -1,7 +1,7 @@
# bash_completion - programmable completion functions for bash 3.x # bash_completion - programmable completion functions for bash 3.x
# (backwards compatible with bash 2.05b) # (backwards compatible with bash 2.05b)
# #
# $Id: bash_completion,v 1.851 2006/02/24 12:48:59 ianmacd Exp $ # $Id: bash_completion,v 1.852 2006/02/24 12:59:03 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -902,6 +902,8 @@ _find()
{ {
local cur prev i exprfound onlyonce local cur prev i exprfound onlyonce
echo FOO
COMPREPLY=() COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]} prev=${COMP_WORDS[COMP_CWORD-1]}
@ -2176,7 +2178,7 @@ _aptitude()
-Z -v --verbose' -Z -v --verbose'
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
if [[ ${COMP_WORDS[i]} == @(install|reinstall|hold|unhold|markauto|unmarkauto|dist-upgrade|download|forbid-version|purge|remove) ]]; then if [[ ${COMP_WORDS[i]} == @(install|reinstall|hold|unhold|markauto|unmarkauto|dist-upgrade|download|show|forbid-version|purge|remove) ]]; then
special=${COMP_WORDS[i]} special=${COMP_WORDS[i]}
fi fi
#exclude some mutually exclusive options #exclude some mutually exclusive options
@ -2186,7 +2188,7 @@ _aptitude()
if [[ -n "$special" ]]; then if [[ -n "$special" ]]; then
case $special in case $special in
@(install|hold|markauto|unmarkauto|dist-upgrade|download)) @(install|hold|markauto|unmarkauto|dist-upgrade|download|show))
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) ) COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
return 0 return 0
;; ;;