The problem has nothing to do with "myscript.php" output.
The problem is in bash completion process wich involves only 
"echoscrip.[php|sh]". These scripts only have (to my comprehension) to output a 
single string, without newline and it is what they do.
The fact is, and I do not understand why because the output is exactly the same 
- using to provide bash COMPREPLY variable value, bash completion 
- using echoscript.php to do the same, bash completion does not work.

I tried to took for a runtime option (php.ini) but didn't found anything 

PS : just because I had to do it, I tried to add newline and cariage return to 
all the scripts. The result is the same, unfortunately.

Le 27 janv. 2010 à 23:27, Rene Veerman a écrit :

> Have you tried letting the php script output "\r\n" instead of just
> "\n" as newline ?
> On Wed, Jan 27, 2010 at 10:46 PM, Alexandre Simon <> wrote:
>> Hello,
>> I'm pretty "sure" (in realty I do not understand a lot about the problem... 
>> :(  ) this is a distribution or a version problem but maybe some PHP/bash 
>> expert here could have some idea and tell me what I could try to solve the 
>> problem described here :
>> Shortly : PHP cli seems to output something like newlines that bash can not 
>> intercept.
>> My initial goal is to complete a PHP script, using the PHP script itselfs as 
>> function for bash completion. Mechanism that works perfectly on some other 
>> platforms (with different PHP AND bash version ...) than Ubuntu 8.04 and 
>> 9.10 (PHP 5.2.4 and PHP 5.2.10 respectively). The interest : only one thing 
>> to code : the php script. Moreover : the PHP scripts knows "things" (DB 
>> connection, .. etc) that the bash script would have some difficulty to get.
>> Thank you a lot for any help.
>> --
>> Alex
>> --
>> PHP General Mailing List (
>> To unsubscribe, visit:

Alexandre Simon

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to