On Sat, 2012-08-04 at 21:49 +0200, Ferenc Kovacs wrote: > Hi, > > As most of you know, the current php interactive shell is pretty much > useless without compiling php --with-readline, but for the most users this > the first impression what they experience (eg. using the php interactive > shell without readline support).
Note that for 5.4 I refactored the code so a shared readline extension is good enough by moving all shell related parts to ext/readline. This should reduce the pain for distribution package users where typically everything is shared. > There is an alternative readline replacement called linenoise ( > https://github.com/antirez/linenoise/) written by the author of Redis, and > I would like to know, what do you think about using that for the > interactive shell if php is built without readline support. > It is really small/compact and it is under the two clause BSD license so I > think it would be a good candidate for bundling it in php. > What do you think about it? Is it something worth looking into? There are two ways to do that: Either move the shell code back to sapi/cli or making ext/readline play nice with linenoise. When using the first approach make sure that the user can still pick readline, as readline has features linenoise (currently) hasn't, like searching using Ctrl+r or configuration of the key combinations. I'd also like if readline can be built shared but still overwrite the built-in default. Doing the second approach has the benefit that the lib can be exported to userland in the same run. While then there's little benefit as it all still depends on an extension ... (Actually there would be a third possibility - writing a linenoise extension which uses sapi/cli's hook but that requires duplicating most of the shell code and makes things more complicated, let#s ignore this ;-) ) What's your plan there? johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php