php-src/ext/readline
Ilija Tovilo 58a191c659
Merge branch 'PHP-8.2'
* PHP-8.2:
  [skip ci] Fix race condition in readline test
2023-05-26 11:39:56 +02:00
..
tests [skip ci] Fix race condition in readline test 2023-05-26 11:39:22 +02:00
config.m4 Add -Wstrict-prototypes compiler warning 2021-05-12 19:02:48 +01:00
config.w32 add readline_list_history with libedit >= 3.1 and mingweditline 2019-02-19 08:51:56 +01:00
CREDITS
php_readline.h Declare ext/readline constants in stubs (#9110) 2022-07-23 12:33:44 +02:00
readline_arginfo.h Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
readline_cli.c Use php_info_print_table_header for actual column headers only (#9485) 2022-09-06 08:48:22 +02:00
readline_cli.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
readline.c Declare ext/readline constants in stubs (#9110) 2022-07-23 12:33:44 +02:00
readline.stub.php Declare ext/readline constants in stubs (#9110) 2022-07-23 12:33:44 +02:00
README.md Allow overriding completion in auto_prepend_file 2020-08-01 11:39:08 -04:00

readline

Provides generic line editing, history, and tokenization functions. See https://www.php.net/manual/en/book.readline.php

Implementation Details

C variables starting with rl_* are declared by the readline library (or are macros referring to variables from the libedit library). See http://web.mit.edu/gnu/doc/html/rlman_2.html

This should only be used in the CLI SAPI. Historically, the code lived in sapi/cli, but many distributions build readline as a shared extension. Therefore, that code was split into ext/readline so that this can dynamically be loaded. With other SAPIs, readline is/should be disabled.

readline_cli.c implements most of the interactive shell(php -a).