[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-39-g23ac383

Igor Murzov e-mail at date.by
Thu Sep 6 14:45:35 UTC 2012


The following commit has been merged in the master branch:
commit 822735146f5a5ef71c75f6f8494ad3969eaf2cc5
Author: Igor Murzov <e-mail at date.by>
Date:   Thu Sep 6 18:16:44 2012 +0400

    _parse_help, _parse_usage: Run commands in C locale.
    
    This avoids divergence of options for a localized and non-localized
    versions of programs. _parse_help may even get into infinite loop
    with localized input.

diff --git a/bash_completion b/bash_completion
index 335f7a3..8d532e1 100644
--- a/bash_completion
+++ b/bash_completion
@@ -756,7 +756,7 @@ _parse_help()
     local line
     { case $cmd in
         -) cat ;;
-        *) "$( dequote "$cmd" )" ${2:---help} 2>&1 ;;
+        *) LC_ALL=C "$( dequote "$cmd" )" ${2:---help} 2>&1 ;;
       esac } \
     | while read -r line; do
 
@@ -781,7 +781,7 @@ _parse_usage()
     local line match option i char
     { case $cmd in
         -) cat ;;
-        *) "$( dequote "$cmd" )" ${2:---usage} 2>&1 ;;
+        *) LC_ALL=C "$( dequote "$cmd" )" ${2:---usage} 2>&1 ;;
       esac } \
     | while read -r line; do
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list