From 6e4404877629252739bf21c8667b51808bcc3783 Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Mon, 4 Mar 2002 03:46:42 +0000 Subject: [PATCH] - _rpm(): perform path completion for --whatprovides if parameter contains a / --- bash_completion | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bash_completion b/bash_completion index d0f94f27..f77b3061 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.175 2002/03/02 01:56:21 ianmacd Exp $ +# $Id: bash_completion,v 1.176 2002/03/04 04:46:42 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -973,8 +973,12 @@ _rpm() return 0 ;; --whatprovides) + if [[ "$cur" == */* ]]; then + _filedir + else # complete on capabilities - COMPREPLY=( $( rpm -qa --queryformat '%{providename}\n' | grep ^$cur ) ) + COMPREPLY=( $( rpm -qa --queryformat '%{providename}\n' | grep ^$cur ) ) + fi return 0 ;; --whatrequires)