- use sed instead of Perl in urpmi completion (patch from Guillaume Rousse

<rousse@ccr.jussieu.fr>)
This commit is contained in:
ianmacd 2002-05-10 16:09:35 +00:00
parent 432e2283f1
commit f4401ed56e

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05a
#
# $Id: bash_completion,v 1.309 2002/05/09 18:20:53 ianmacd Exp $
# $Id: bash_completion,v 1.310 2002/05/10 18:09:35 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -2822,7 +2822,7 @@ _urpmi_media()
{
local IFS=$'\t\n'
# return list of available urpmi media
COMPREPLY=( $( perl -ln -e 'if (m/^(.+) .+ {$/) {print $1}' /etc/urpmi/urpmi.cfg | grep "^${cur//\\\\/\\\\}" ) )
COMPREPLY=( $( sed -ne "s/^\(.\+\) \(\(file\|removable\|ftp\|http\):\/\/.*\)\? {$/\1/p" /etc/urpmi/urpmi.cfg | grep "^${cur//\\\\/\\\\}" ) )
}
# Mandrake urpmi completion