From 08b34a63ba83bca54a106fe7cdaead6169630a8e Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Mon, 11 Feb 2002 05:06:19 +0000 Subject: [PATCH] in _apt-cache(), return package list for --show, --showpkg, --depends and --dotty --- bash_completion | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bash_completion b/bash_completion index 9ecfea96..6bf85636 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05a # -# $Id: bash_completion,v 1.101 2002/02/11 03:14:08 ianmacd Exp $ +# $Id: bash_completion,v 1.102 2002/02/11 06:06:19 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -946,7 +946,7 @@ _apt-cache() for (( i=0; i < ${#COMP_WORDS}-1; i++ )); do - if [[ ${COMP_WORDS[i]} == @(add|showpkg) ]]; then + if [[ ${COMP_WORDS[i]} == @(add|show?(pkg)|depends|dotty) ]]; then special=${COMP_WORDS[i]} fi done @@ -956,7 +956,7 @@ _apt-cache() COMPREPLY=( $( compgen -f $cur ) ) return 0 ;; - showpkg) + show?(pkg)|depends|dotty) COMPREPLY=( $( apt-cache pkgnames $cur ) ) return 0 ;; @@ -968,7 +968,7 @@ _apt-cache() COMPREPLY=( $( compgen -f $cur ) ) else COMPREPLY=( $( compgen -W 'add gencaches showpkg stats dump \ - dumpavail unmet check search show showpkg \ + dumpavail unmet check search show dotty \ depends pkgnames -h -v -p -s -q -i -f -a -g -c \ -o --help --version --pkg-cache --src-cache \ --quiet --important --full --all-versions \ @@ -979,6 +979,7 @@ _apt-cache() return 0 } [ "$have" ] && complete -F _apt-cache -o filenames apt-cache +complete -F _apt-cache -o filenames apt-cache # chsh(1) completion #