Tab autocompletion in bash using php

lilioptioxHob

New Member
Hey guys, I'm writing a simple script to autocomplete when I press TAB.The php script contains a simple "echo".In this case, the autocomplete works but a "tab" is appended to the output making it uselessCode from the script \[code\]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 ddaalias dda=$scriptPath\[/code\]Code from php script \[code\]<?phpecho "hello";?>\[/code\]Here is the annoying part:If I print the echo in Python or Ruby, it works like a charm -- ie each time I press TAB, it calls the scripts and output hello.Is this a bug with PHP or my code?They seem to disagree at http://bugs.php.net/bug.php?id=52755
 
Back
Top