. Fixed bug #65414 (deal with leading slash when adding files correctly).
(bishopb)
+- readline:
+ . Added completion_append_character and completion_suppress_append options
+ to readline_info() if linked against libreadline. (krageon)
+
- Session:
. Fixed bug #74941 (session fails to start after having headers sent).
(morozov)
BCMath:
. bcscale() can now also be used as getter to retrieve the current scale in use.
+readline:
+ . Support for the completion_append_character and completion_suppress_append
+ options has been added to readline_info(). These options are only available
+ if PHP is linked against libreadline (rather than libedit).
+
========================================
3. Changes in SAPI modules
========================================
add_assoc_long(return_value,"pending_input",rl_pending_input);
add_assoc_string(return_value,"prompt",SAFE_STRING(rl_prompt));
add_assoc_string(return_value,"terminal_name",(char *)SAFE_STRING(rl_terminal_name));
+ add_assoc_str(return_value, "completion_append_character",
+ rl_completion_append_character == 0
+ ? ZSTR_EMPTY_ALLOC()
+ : ZSTR_CHAR(rl_completion_append_character));
+ add_assoc_bool(return_value,"completion_suppress_append",rl_completion_suppress_append);
#endif
#if HAVE_ERASE_EMPTY_LINE
add_assoc_long(return_value,"erase_empty_line",rl_erase_empty_line);
RETVAL_STRING(SAFE_STRING(rl_prompt));
} else if (!strcasecmp(what, "terminal_name")) {
RETVAL_STRING((char *)SAFE_STRING(rl_terminal_name));
+ } else if (!strcasecmp(what, "completion_suppress_append")) {
+ oldval = rl_completion_suppress_append;
+ if (value) {
+ rl_completion_suppress_append = zend_is_true(value);
+ }
+ RETVAL_BOOL(oldval);
+ } else if (!strcasecmp(what, "completion_append_character")) {
+ oldval = rl_completion_append_character;
+ if (value) {
+ convert_to_string_ex(value)
+ rl_completion_append_character = (int)Z_STRVAL_P(value)[0];
+ }
+ RETVAL_INTERNED_STR(
+ oldval == 0 ? ZSTR_EMPTY_ALLOC() : ZSTR_CHAR(oldval));
#endif
#if HAVE_ERASE_EMPTY_LINE
} else if (!strcasecmp(what, "erase_empty_line")) {
var_dump(readline_info('readline_name'));
var_dump(readline_info('attempted_completion_over',1));
var_dump(readline_info('attempted_completion_over'));
+var_dump(readline_info('completion_append_character', "\0"));
+var_dump(readline_info('completion_append_character'));
+var_dump(readline_info('completion_suppress_append', true));
+var_dump(readline_info('completion_suppress_append'));
?>
--EXPECTF--
-array(11) {
+array(13) {
["line_buffer"]=>
string(0) ""
["point"]=>
string(0) ""
["terminal_name"]=>
string(0) ""
+ ["completion_append_character"]=>
+ string(1) " "
+ ["completion_suppress_append"]=>
+ bool(false)
["library_version"]=>
string(%d) "%s"
["readline_name"]=>
string(1) "1"
int(0)
int(1)
+string(1) " "
+string(0) ""
+bool(false)
+bool(true)
\ No newline at end of file