[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tab completion and ':'s

From: Chet Ramey
Subject: Re: Tab completion and ':'s
Date: Fri, 14 Nov 2014 09:34:30 -0500

> 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

> 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    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]