On 5/30/11 2:05 PM, Raphaël Droz wrote: > It seems like if gnu.bash....@googlegroups.com eat the first occurrence > of this email (not in the mailman archives)... second attempt: > > === Rationale: > Let's say you want to complete http URL (which contain ':'). > > The completion probably contains this kind of statement: > > _comp() { > COMPREPLY=( $(compgen -W "http://foo http://bar" -- "$cur") ) > } > > After the completion function is evaluated, readline will consider > the value of $COMP_WORDBREAKS to split the word to complete...
I sent an earlier message explaining how this explanation was slightly wrong, but I looked at the patches and they do the right thing. The patch attempts to determine the command name before readline performs its wordbreak processing, and installs a new value for the set of word break characters before that happens. The question that comes to mind is whether or not this complication is worth it. This seems like a pretty heavyweight solution to an occasional problem with `:'. The best approach might be to remove the colon from the default set of word break characters. I have to think that the number of users completing colon-separated path values is smaller than the number attempting to complete URLs. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/