Expose attempted_completion_over variable from readline library #349

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

hartmel commented May 27, 2013

This variable allows to prevent filename completion in completer function by exposing this variable and allowing PHP to update it. It closes https://bugs.php.net/bug.php?id=55694
Patch used (and updated) since PHP 5.2.

better to be : strncasecmp(what, "attempted_completion_over", sizeof("attempted_completion_over") - 1)

Owner

laruence commented May 28, 2013

and also, test script is needed , thanks

hartmel commented May 28, 2013

It seemed safe to use strcasecmp since others statements dealing with readline variables use it too.
I updated the test script to handle the new variable.

$ ./run-tests.php ext/readline/tests/readline_info_001.phpt

PHP : ./sapi/cli/php
PHP_SAPI : cli
PHP_VERSION : 5.6.0-dev
ZEND_VERSION: 2.6.0-dev
PHP_OS : Linux - Linux hartmel-wheezy64 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64
INI actual : /home/hartmel/php-src
More .INIs :
CWD : /home/hartmel/php-src
Extra dirs :
VALGRIND : Not used
Running selected tests.
PASS readline_info(): Basic test [ext/readline/tests/readline_info_001.phpt]
Number of tests : 1 1
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 0 ( 0.0%) ( 0.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)

Tests passed : 1 (100.0%) (100.0%)

Time taken : 0 seconds

Comment on behalf of stas at php.net:

merged

php-pulls closed this Jun 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment