> I'm working on adding tab completion to an application that deals with
> URLs, among other things. Since readline includes ':' as a delimiting
> character, it causes minor annoyances with tab-completing URLs. There's the
> known workaround of removing ':' from COMP_WORDBREAKS, but that requires
> every person that installs the application to apply the workaround, which
> is slightly less than ideal.

If you're integrating readline directly into an application, you can set
the completion word break characters to whatever you like; see
rl_completer_word_break_characters.

> I'm trying to see if there's a better solution that doesn't require any
> action from the user. One thought I had was what if readline/bash allowed
> control over the insertion point of the completion result? i.e. if there
> was a COMP_INSERT_POINT variable that could get/set the insertion point. Is
> that feasible?

I'm not sure how you would use this, since readline breaks the line into words
for the completion code before the results are generated and inserted.

-- 
``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/

Reply via email to