[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Programmable completion and the @ symbol.
From: |
Ben Logan |
Subject: |
Re: Programmable completion and the @ symbol. |
Date: |
Fri, 14 Jun 2002 06:37:47 -0400 |
User-agent: |
Mutt/1.2.5i |
On Thu, Jun 13, 2002 at 04:45:15PM -0700, Ian Macdonald wrote:
> On Thu 13 Jun 2002 at 19:16:54 -0400, you wrote:
>
> > However, I wish that I could get it to work so that the completion
> > function presents a list of maps until an '@' is typed, and then
> > presents a list of mapsets.
>
> This is similar to having ssh complete on user@host combinations. Have
> a look at the _ssh() and _known_hosts() functions attached to this
> e-mail.
>
> > I just can't get the completion to work. I
> > think the problem is that the '@' symbol is a word delimiter, and is
> > screwing things up.
>
> '@' starts standard hostname completion in bash, so you need to turn
> it off with 'shopt -u hostcomplete'.
>
> > I also wish I could prevent Bash from printing the space after it
> > completes the first word, so that I don't have to backspace once
> > before typing the '@'. :)
>
> The appending of a space is very annoying and something that I find I
> frequently selectively want to turn off within the body of a function,
> but bash doesn't allow this level of fine-grained control.
>
> You can find more examples of programmable completion at
> http://www.caliban.org/bash
Thanks, this is all very helpful. I think I can figure it out now,
although I may come back with more questions. :)
Regards,
Ben
--
Ben Logan: ben at wblogan dot net
OpenPGP Key KeyID: A1ADD1F0
I'm having a BIG BANG THEORY!!