[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] support 'COMP_WORDBREAKS' value on a per-completion basis
From: |
Raphaël Droz |
Subject: |
Re: [RFC] support 'COMP_WORDBREAKS' value on a per-completion basis |
Date: |
Mon, 22 Aug 2011 11:22:36 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jun 23, 2011 at 10:49:20AM -0400, Chet Ramey wrote:
> On 5/30/11 2:05 PM, Raphaël Droz wrote:
> > === 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...
>
> 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 `:'.
would you have any advise to give for a lighter solution ?
Isn't rl_completion_word_break_hook the way to go ?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [RFC] support 'COMP_WORDBREAKS' value on a per-completion basis,
Raphaël Droz <=