[Bash-completion-commits] [SCM] bash-completion branch, master, updated. e6a18ac7cf2e45fdceb2e1f2ca504780ce852901

Freddy Vulto fvulto at gmail.com
Mon Sep 28 18:23:22 UTC 2009


The following commit has been merged in the master branch:
commit e6a18ac7cf2e45fdceb2e1f2ca504780ce852901
Author: Freddy Vulto <fvulto at gmail.com>
Date:   Mon Sep 28 20:21:54 2009 +0200

    Quoted $cur to prevent globbing
    See Alioth #311614

diff --git a/bash_completion b/bash_completion
index bae3a76..4dbe5e8 100644
--- a/bash_completion
+++ b/bash_completion
@@ -960,7 +960,7 @@ _insmod()
 	   [[ "${COMP_WORDS[COMP_CWORD-1]}" != -* ]]; then
 		# do module parameter completion
 		COMPREPLY=( $( /sbin/modinfo -p ${COMP_WORDS[1]} 2>/dev/null | \
-		       awk '{if ($1 ~ /^parm:/ && $2 ~ /^'$cur'/) { print $2 } \
+		       awk '{if ($1 ~ /^parm:/ && $2 ~ /^'"$cur"'/) { print $2 } \
 			else if ($1 !~ /:/ && $1 ~ /^'"$cur"'/) { print $1 }}' ) )
 	else
 		_modules $(uname -r)
diff --git a/contrib/bash-builtins b/contrib/bash-builtins
index c514bf6..cccf38e 100644
--- a/contrib/bash-builtins
+++ b/contrib/bash-builtins
@@ -18,7 +18,7 @@ _alias()
 		;;
 	*=)
 		COMPREPLY=( "$( alias ${cur%=} 2>/dev/null | \
-			     sed -e 's|^alias '$cur'\(.*\)$|\1|' )" )
+			     sed -e 's|^alias '"$cur"'\(.*\)$|\1|' )" )
 		;;
 	esac
 }

-- 
bash-completion



More information about the Bash-completion-commits mailing list