On Mon, 02 May 2011 21:10:29 +0300, Ville Skyttä wrote: > $ bash --norc > $ _php() { COMPREPLY=( $( compgen -W '$( php -h )' -- "$2" ) ); } > $ complete -F _php php > > Then, tried completing "php -<TAB>". All good so far, stuff starting > with - is listed. But then hit another tab and things go south: no more > completing, hitting tab actually inserts a tab to the console. The php > invocation doesn't even have to be related to creating the completions, > for example this function shows the same behavior: > > _php() { > php -h &>/dev/null > COMPREPLY=( $( compgen -W '--foo --bar' -- "$2" ) ) > } > > I've never seen this behavior before, and it seems to happen only with > php for me. And my own system is the only one I see this with: > > bash 4.1.7(1)-release, PHP 5.3.6 (Fedora 14) > Ditto with bash 3.2.39(1)-release on the same box. > > I cannot reproduce the problem with the following, it works fine with them: > > [..] > bash 4.1.5(1)-release, php 5.3.3-7+squeeze1 (Debian)
Neither do I :/ (with php 5.3.6-10 and the same Bash as yours on Debian) > Anyone have ideas what might cause this? What does bash say after a set -x? Anything useful? Cluelessly, David -- . ''`. Debian developer | http://wiki.debian.org/DavidPaleino : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/ `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
signature.asc
Description: PGP signature
_______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel