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
Ian
--
Ian Macdonald | I often quote myself; it adds spice to my
ian@caliban.org | conversation. -- G. B. Shaw
|
|
|