Blame bash-completion-1.0-bash4quoting-490322.patch
|
Ville Skyttä |
b5b5ad |
From: Mike Kelly <pioto@pioto.org>
|
|
Ville Skyttä |
b5b5ad |
Date: Thu, 2 Apr 2009 15:16:46 +0000 (-0400)
|
|
Ville Skyttä |
b5b5ad |
Subject: Fix _filedir on bash 4.
|
|
Ville Skyttä |
b5b5ad |
X-Git-Url: http://git.debian.org/?p=bash-completion%2Fbash-completion.git;a=commitdiff_plain;h=1421e55aac075e13491cd212b796bdd453214a2c
|
|
Ville Skyttä |
b5b5ad |
|
|
Ville Skyttä |
b5b5ad |
Fix _filedir on bash 4.
|
|
Ville Skyttä |
b5b5ad |
|
|
Ville Skyttä |
b5b5ad |
We don't need to double-quote things for compgen w/ bash 4. Just putting
|
|
Ville Skyttä |
b5b5ad |
each file in double quotes is sufficient.
|
|
Ville Skyttä |
b5b5ad |
|
|
Ville Skyttä |
b5b5ad |
See: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html
|
|
Ville Skyttä |
b5b5ad |
---
|
|
Ville Skyttä |
b5b5ad |
|
|
Ville Skyttä |
b5b5ad |
diff --git a/bash_completion b/bash_completion
|
|
Ville Skyttä |
b5b5ad |
index 0246cd8..4d21cf8 100644
|
|
Ville Skyttä |
b5b5ad |
--- a/bash_completion
|
|
Ville Skyttä |
b5b5ad |
+++ b/bash_completion
|
|
Ville Skyttä |
b5b5ad |
@@ -209,6 +209,12 @@ quote()
|
|
Ville Skyttä |
b5b5ad |
# results in the original argument
|
|
Ville Skyttä |
b5b5ad |
quote_readline()
|
|
Ville Skyttä |
b5b5ad |
{
|
|
Ville Skyttä |
b5b5ad |
+ if [[ "${BASH_VERSINFO[0]}" -ge 4 ]] ; then
|
|
Ville Skyttä |
b5b5ad |
+ # This function isn't really necessary on bash 4
|
|
Ville Skyttä |
b5b5ad |
+ # See: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html
|
|
Ville Skyttä |
b5b5ad |
+ echo "${1}"
|
|
Ville Skyttä |
b5b5ad |
+ return
|
|
Ville Skyttä |
b5b5ad |
+ fi
|
|
Ville Skyttä |
b5b5ad |
local t="${1//\\/\\\\}"
|
|
Ville Skyttä |
b5b5ad |
echo \'${t//\'/\'\\\'\'}\' #'# Help vim syntax highlighting
|
|
Ville Skyttä |
b5b5ad |
}
|