php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31796 readline() completes filesystem
Submitted: 2005-02-01 21:12 UTC Modified: 2005-02-03 23:47 UTC
From: david at acz dot org Assigned:
Status: Closed Package: Readline related
PHP Version: 4CVS, 5CVS (2005-02-03) OS: *
Private report: No CVE-ID:
 [2005-02-01 21:12 UTC] david at acz dot org
Description:
------------
The readline() function always tab completes the filesystem even if a custom completion function is used.  This behavior is undocumented and undesirable in some applications.

Reproduce code:
---------------
<?
    readline_completion_function("complete");
    readline("> ");

    function complete($line, $pos, $cursor)
    {
        return array();
    }
?>


Expected result:
----------------
I expect nothing to happen when I press tab.

Actual result:
--------------
The filesystem is completed as with bash.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-03 16:33 UTC] wez@php.net
Are you sure your callback is being called?
 [2005-02-03 18:18 UTC] david at acz dot org
I am positive.
 [2005-02-03 23:47 UTC] iliaa@php.net
This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 17 12:01:59 2014 UTC