From: Chet Ramey Date: Wed, 7 Dec 2011 14:18:01 +0000 (-0500) Subject: commit bash-20080124 snapshot X-Git-Tag: bash-4.0-alpha~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=390aba803e5ea3e8683e4b933e9bad381a9eadf7;p=thirdparty%2Fbash.git commit bash-20080124 snapshot --- diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 3f001385a..41aab0a14 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -15242,7 +15242,9 @@ lib/readline/{misc,readline,vi_mode,vi_keymap}.c builtins/read.def - change timeout behavior when not reading from a tty device to save any partial input in the variable list, but still return failure. - Fix inspired by Brian Craft + This also causes variables specified as arguments to read to be + set to null when there is no input available. Fix inspired by + Brian Craft 1/21 ---- @@ -15250,3 +15252,9 @@ builtins/fc.def - change computation of last_hist to use remember_on_history instead of a hard-coded `1'. This keeps fc -l -1 in PROMPT_COMMAND from looking too far back + + 1/25 + ---- +lib/readline/complete.c + - fix fnwidth to use string[pos] instead of *string when testing the + current character for a control character or rubout diff --git a/CWRU/CWRU.chlog~ b/CWRU/CWRU.chlog~ index 78991a646..5df0b0900 100644 --- a/CWRU/CWRU.chlog~ +++ b/CWRU/CWRU.chlog~ @@ -15242,4 +15242,13 @@ lib/readline/{misc,readline,vi_mode,vi_keymap}.c builtins/read.def - change timeout behavior when not reading from a tty device to save any partial input in the variable list, but still return failure. - Fix inspired by Brian Craft + This also causes variables specified as arguments to read to be + set to null when there is no input available. Fix inspired by + Brian Craft + + 1/21 + ---- +builtins/fc.def + - change computation of last_hist to use remember_on_history instead + of a hard-coded `1'. This keeps fc -l -1 in PROMPT_COMMAND from + looking too far back diff --git a/lib/readline/complete.c b/lib/readline/complete.c index 64e4a235d..aa3b9755c 100644 --- a/lib/readline/complete.c +++ b/lib/readline/complete.c @@ -599,7 +599,7 @@ fnwidth (string) width = pos = 0; while (string[pos]) { - if (CTRL_CHAR (*string) || *string == RUBOUT) + if (CTRL_CHAR (string[pos]) || string[pos] == RUBOUT) { width += 2; pos++; diff --git a/lib/readline/complete.c~ b/lib/readline/complete.c~ index 90528bc63..64e4a235d 100644 --- a/lib/readline/complete.c~ +++ b/lib/readline/complete.c~ @@ -416,6 +416,7 @@ set_completion_defaults (what_to_do) rl_filename_quoting_desired = 1; rl_completion_type = what_to_do; rl_completion_suppress_append = rl_completion_suppress_quote = 0; + rl_completion_append_character = ' '; /* The completion entry function may optionally change this. */ rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs; @@ -438,7 +439,7 @@ get_y_or_n (for_pager) return (1); if (c == 'n' || c == 'N' || c == RUBOUT) return (0); - if (c == ABORT_CHAR) + if (c == ABORT_CHAR || c < 0) _rl_abort_internal (); if (for_pager && (c == NEWLINE || c == RETURN)) return (2); diff --git a/tests/RUN-ONE-TEST b/tests/RUN-ONE-TEST index 72ec06a2c..3efcf32d6 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 diff --git a/tests/read.right b/tests/read.right index 8f0b2bffd..ae405a259 100644 --- a/tests/read.right +++ b/tests/read.right @@ -34,12 +34,12 @@ a = xyz a = -xyz 123- a = abc 1 -4 + 1 -4 + ./read2.sub: line 13: read: -3: invalid timeout specification 1 -4 + abcde ./read3.sub: line 4: read: -1: invalid number abc