> I added some echos to the completion function to check, and I see > something different.
I think you (and the author of the completion function) misinterpreted the intended results. The COMP_WORDS array is an array of the words on the command line, split as the shell would split them during parsing. That's intended to allow function writers to see the words of the command as they would eventually be parsed. The second argument to the shell function ($2) is the word being completed, and that is as readline breaks the words. The nature of COMP_WORDS isn't as clear as it could be made in the bash documentation, but that can be changed. Readline's behavior when splitting words for the completer can be intuited from the difference, if any, between $2 and ${COMP_WORDS[$COMP_CWORD]}. That can give the function writer greater context. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://tiswww.tis.case.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash