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