diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index aee60786..dcf1243b 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -1776,3 +1776,11 @@ subst.c doc/{bash.1,bashref.texi} - document new '@k' parameter transformation operator + + 8/27 + ---- +lib/readline/kill.c + - rl_unix_filename_rubout: handle pathnames that consist only of one + or more slashes. The old code went too far and deleted the previous + word as well. From dabe@dabe.com + diff --git a/lib/readline/kill.c b/lib/readline/kill.c index 8a4ff349..61b744c9 100644 --- a/lib/readline/kill.c +++ b/lib/readline/kill.c @@ -351,6 +351,30 @@ rl_unix_filename_rubout (int count, int key) while (count--) { c = rl_line_buffer[rl_point - 1]; + + /* First move backwards through whitespace */ + while (rl_point && whitespace (c)) + { + rl_point--; + c = rl_line_buffer[rl_point - 1]; + } + + /* Consume one or more slashes. */ + if (c == '/') + { + int i; + + i = rl_point - 1; + while (i > 0 && c == '/') + c = rl_line_buffer[--i]; + if (i == 0 || whitespace (c)) + { + rl_point = i + whitespace (c); + continue; /* slashes only */ + } + c = '/'; + } + while (rl_point && (whitespace (c) || c == '/')) { rl_point--; diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo index c61c0b58..f947cdfe 100644 Binary files a/po/pt_BR.gmo and b/po/pt_BR.gmo differ diff --git a/po/pt_BR.po b/po/pt_BR.po index cddc1d90..47867bdd 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -22,7 +22,7 @@ msgstr "" #: arrayfunc.c:66 msgid "bad array subscript" -msgstr "subscrito de array incorreto" +msgstr "subscript de array incorreto" #: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 #: variables.c:3133 @@ -48,7 +48,7 @@ msgstr "%s: impossível atribuir a índice não numérico" #: arrayfunc.c:747 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "%s: %s: deve usar subscrito ao atribuir um array associativo" +msgstr "%s: %s: deve-se usar subscript ao atribuir um array associativo" #: bashhist.c:452 #, c-format @@ -4049,7 +4049,7 @@ msgstr "" " -t Sai após a leitura e execução de um comando.\n" " -u Trata limpeza (unset) de variáveis como um erro quando substituindo.\n" " -v Mostra linhas de entrada do shell na medida em que forem lidas.\n" -" -x Mostra comandos e seus argumentos na medida em que forme executados.\n" +" -x Mostra comandos e seus argumentos na medida em que forem executados.\n" " -B o shell vai realizar expansão de chaves\n" " -C Se definido, não permite arquivos normais existentes serem\n" " sobrescritos por redirecionamento da saída.\n" diff --git a/subst.c b/subst.c index 43862cb9..2f37944a 100644 --- a/subst.c +++ b/subst.c @@ -8332,7 +8332,7 @@ parameter_brace_substring (varname, value, ind, substr, quoted, pflags, flags) /* */ /****************************************************************/ -#if 0 /* TAG: bash-5.2? */ +#if 0 /* TAG: bash-5.2 */ static int shouldexp_replacement (s) char *s; @@ -8374,7 +8374,7 @@ pat_subst (string, pat, rep, mflags) mtype = mflags & MATCH_TYPEMASK; -#if 0 /* TAG: bash-5.2? */ +#if 0 /* TAG: bash-5.2 */ rxpand = (rep && *rep) ? shouldexp_replacement (rep) : 0; #else rxpand = 0; diff --git a/tests/RUN-ONE-TEST b/tests/RUN-ONE-TEST index c8bef8dd..0b063810 100755 --- a/tests/RUN-ONE-TEST +++ b/tests/RUN-ONE-TEST @@ -1,4 +1,4 @@ -BUILD_DIR=/usr/local/build/bash/bash-current +BUILD_DIR=/usr/local/build/chet/bash/bash-current THIS_SH=$BUILD_DIR/bash PATH=$PATH:$BUILD_DIR