|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2010-09-01 06:27 UTC] aharvey@php.net
 
-Status: Open
+Status: Bogus
  [2010-09-01 06:27 UTC] aharvey@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
Description: ------------ In order to write a bash autocompletion program using php, you need two simple files. 1. bash script 2. php file processing the command and printing it In this case, the autocomplete works but a "tab" is appended to the output making it useless The php script contains a simple "echo". If I print the echo in python or ruby, it works properly (no tabs appended) and each time I press tab the command is printed. That's how it should work for php as well. Test script: --------------- scriptPath='/home/hassen/workspace/scripts/bin/test.php' _dda() { local cur COMPREPLY=() unset COMP_WORDS[0] #remove "j" from the array cur=${COMP_WORDS[*]} IFS=$'\n\n' read -d '' -a COMPREPLY < <($scriptPath --completion "$cur") return 0 } complete -F _dda dda alias dda=$scriptPath ---- test.php <?php echo "hello"; ?> Expected result: ---------------- "hello" should be appended each time I press "TAB" Actual result: -------------- Tabs are appended