Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : GNU Readline : readline_completion_function

readline_completion_function

Registers a completion function (PHP 4, PHP 5)
bool readline_completion_function ( callback function )


Code Examples / Notes » readline_completion_php

david

This function can simply return an array of all possible matches (regardless of the current user intput) and readline will handle the matching itself.  This is likely to be much faster than attempting to handle partial matches in PHP.

john

It seems that the registered function can accept 2 parameters, the first being the partial string, the second a number that when equal to zero indicates that the tab was hit on the first argument on the input. Otherwise it looks like the position within the string is returned.
This is neccessary information for processing shell command line input.


Change Language


Follow Navioo On Twitter
readline_add_history
readline_callback_handler_install
readline_callback_handler_remove
readline_callback_read_char
readline_clear_history
readline_completion_function
readline_info
readline_list_history
readline_on_new_line
readline_read_history
readline_redisplay
readline_write_history
readline
eXTReMe Tracker