From acc76f1bb55f1ec6a324528d78b4a32f3db1be1b Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Fri, 24 Feb 2006 11:59:03 +0000 Subject: [PATCH] Make 'aptitude show' work the same way as 'apt-cache show'. Fix from nerf . --- bash_completion | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bash_completion b/bash_completion index 524254e5..eb5a4483 100644 --- a/bash_completion +++ b/bash_completion @@ -1,7 +1,7 @@ # bash_completion - programmable completion functions for bash 3.x # (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 # @@ -902,6 +902,8 @@ _find() { local cur prev i exprfound onlyonce + echo FOO + COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} @@ -2176,7 +2178,7 @@ _aptitude() -Z -v --verbose' 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]} fi #exclude some mutually exclusive options @@ -2186,7 +2188,7 @@ _aptitude() if [[ -n "$special" ]]; then 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 ) ) return 0 ;;