|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #55694 Expose additionnal readline variable to prevent default filename completion
Submitted: 2011-09-14 14:42 UTC Modified: 2013-06-17 07:19 UTC
From: axel dot ml at laposte dot net Assigned: stas (profile)
Status: Closed Package: Readline related
PHP Version: 5.3.8 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: axel dot ml at laposte dot net
New email:
PHP Version: OS:


 [2011-09-14 14:42 UTC] axel dot ml at laposte dot net
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

Another bug report for this with a patch which does the job but in a wrong way, imo.


completion_over.patch (last revision 2011-09-14 14:43 UTC by axel dot ml at laposte dot net)

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-17 07:19 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: stas
 [2013-06-17 07:19 UTC]
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

 For Windows:
Thank you for the report, and for helping us make PHP better.

Pull merged into 5.4 and above.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 11:01:29 2024 UTC