Your message dated Thu, 4 Nov 2010 22:32:36 +0100
with message-id <[email protected]>
and subject line FIXED: bash: In multibytes locale, some history expansion 
function won't work
has caused the Debian Bug report #367451,
regarding bash: In multibytes locale, some history expansion function won't work
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
367451: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=367451
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash
Version: 2.05b-26
Severity: normal
Tags: patch

In a C locale,
first type "cp a b"
then type "!cp:p"
bash will echo "cp a b"

In a multibytes locale such as zh_CN,
first type "cp a b"
then type "!cp:p"
bash will return with "-bash: !cp:p: event not found"

The follwing patch will fixed it.
I have posted the patch to the bash bug maillist, I got no response.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.13.1-skas3-v8.2
Locale: LANG=zh_CN, LC_CTYPE=zh_CN.GB2312 (charmap=GB2312)

Versions of packages bash depends on:
ii  base-files              3.1.2            Debian base system miscellaneous f
ii  libc6                   2.3.2.ds1-22     GNU C Library: Shared libraries an
ii  libncurses5             5.4-4            Shared libraries for terminal hand
ii  passwd                  1:4.0.3-31sarge5 change and administer password and

-- no debconf information
diff -pru bash-2.05b/lib/readline/histexpand.c bash-2.05b-lepton/lib/readline/histexpand.c
--- bash-2.05b/lib/readline/histexpand.c	2002-04-16 23:47:59.000000000 +0800
+++ bash-2.05b-lepton/lib/readline/histexpand.c	2006-04-24 16:21:52.000000000 +0800
@@ -217,15 +217,17 @@ get_history_event (string, caller_index,
 	    i += v - 1;
 	    continue;
 	  }
-      }
-    else
+	else 
 #endif /* HANDLE_MULTIBYTE */
-      if ((!substring_okay && (whitespace (c) || c == ':' ||
+         if ((!substring_okay && (whitespace (c) || c == ':' ||
 	  (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) ||
 	  string[i] == delimiting_quote)) ||
 	  string[i] == '\n' ||
 	  (substring_okay && string[i] == '?'))
-	break;
+   	    break;
+#if defined (HANDLE_MULTIBYTE)
+	}
+#endif
 
   which = i - local_index;
   temp = (char *)xmalloc (1 + which);
Only in bash-2.05b/lib/readline: histexpand.o

--- End Message ---
--- Begin Message ---
Package: bash
Version: 3.0+3.1a1-1

This bug has been fixed five years ago.

Nikolaus


--- End Message ---

Reply via email to