]> granicus.if.org Git - php/commit
Allow overriding completion in `auto_prepend_file`
authorTyson Andre <tysonandre775@hotmail.com>
Sat, 18 Jul 2020 21:54:59 +0000 (17:54 -0400)
committerTyson Andre <tysonandre775@hotmail.com>
Sat, 1 Aug 2020 15:39:08 +0000 (11:39 -0400)
commit97f10fc341fb320dd803b83e0b3a3041a1ee2046
tree88d9e902bac65297243c3cc62e4064a5dbcb933e
parentec22e5aa3841770259161ff260da19b781af536e
Allow overriding completion in `auto_prepend_file`

Currently, it's possible to override `php -a`s completion
functionality to provide an alternative to the C implementation,
with `readline_completion_function()`.

However, that surprisingly gets overridden when called from
`auto_prepend_file`, because those scripts get run before the interactive shell
is started. I believe that not overriding it would be more consistent
with what happens when you override the completion function **after** the
interactive shell.

CLI is the only built-in API that uses this (See discussion in GH-5872).
I believe MINIT and RINIT will only run once when invoked with `php -a`.

Add documentation about the architecture of how php uses readline/libedit

Closes GH-5872
UPGRADING
ext/readline/README.md [new file with mode: 0644]
ext/readline/readline.c
ext/readline/readline_cli.c
ext/readline/readline_cli.h