Hey guys, I'm writing a simple script to autocomplete when I press TAB.
Php script "echo" basit bir içerir.
In this case, the autocomplete works but a "tab" is appended to the output making it useless
Script kodu
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
Php script kodu
<?php
echo "hello";
?>
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