Edit report at https://bugs.php.net/bug.php?id=55694&edit=1

 ID:                 55694
 Updated by:         s...@php.net
 Reported by:        axel dot ml at laposte dot net
 Summary:            Expose additionnal readline variable to prevent
                     default filename completion
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Readline related
 PHP Version:        5.3.8
-Assigned To:        
+Assigned To:        stas
 Block user comment: N
 Private report:     N

 New Comment:

The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Pull merged into 5.4 and above.


Previous Comments:
------------------------------------------------------------------------
[2011-09-14 14:42:42] axel dot ml at laposte dot net

Description:
------------
Actually, when using a custom completion function with 
readline_completion_function(), if this custom completion function does not 
find any match, it falls back to the default filename completion.

In order to prevent this behaviour, the C API of readline provides a variable 
named "rl_attempted_completion_over". Defining this variable to a non-zero 
value disables the uses of the default filename completion.

This variable is not exposed to PHP and the filename completion cannot be 
bypassed. The provided patch exposes this variable to PHP, and allows to use 
readline_info("attempted_completion_over", 1) in the PHP completion function to 
prevent default filename completion to occurs.

There is a bug report but it s closed since 2005 
https://bugs.php.net/bug.php?id=31796

Another bug report for this https://bugs.php.net/bug.php?id=48089 with a patch 
which does the job but in a wrong way, imo.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55694&edit=1

Reply via email to