From d6c6964131b964138d8c71d731bfbda41087eb9c Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Mon, 19 Jul 2004 06:45:15 +0000 Subject: [PATCH] =?UTF-8?q?-=20CVS=20completion=20fix=20by=20Ville=20Skytt?= =?UTF-8?q?=C3=A4=20,=20to=20allow=20better=20=20=20h?= =?UTF-8?q?andling=20of=20files=20and=20dirs=20whose=20names=20contain=20w?= =?UTF-8?q?hitespace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash_completion | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bash_completion b/bash_completion index 49b95e1e..7e759aa8 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05b # -# $Id: bash_completion,v 1.738 2004/07/19 08:43:10 ianmacd Exp $ +# $Id: bash_completion,v 1.739 2004/07/19 08:45:15 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -314,7 +314,7 @@ _gids() fi } -# This function complete on services +# This function completes on services # _services() { @@ -1286,9 +1286,10 @@ set_prefix() get_entries() { + local IFS=$'\n' [ -r ${prefix:-}CVS/Entries ] && \ entries=( $( compgen -W \ - "$( echo $( cut -d/ -f2 -s ${prefix:-}CVS/Entries ) )" -- $cur ) ) + $( cut -d/ -f2 -s ${prefix:-}CVS/Entries ) -- $cur ) ) } get_modules() @@ -1441,7 +1442,7 @@ _cvs() COMPREPLY=( $( compgen -W '${changed[@]:-} \ ${newremoved[@]:-}' -- $cur ) ) else - COMPREPLY=( $( compgen -f -- $cur ) ) + _filedir fi else COMPREPLY=( $( compgen -W '-n -R -l -f -F -m -r' -- \