[Top][All Lists]

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

Re: Programmable completion and the @ symbol.

From: Ian Macdonald
Subject: Re: Programmable completion and the @ symbol.
Date: Thu, 13 Jun 2002 16:45:15 -0700
User-agent: Mutt/1.4i

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 address@hidden combinations. Have
a look at the _ssh() and _known_hosts() functions attached to this

> 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

Ian Macdonald               | I often quote myself; it adds spice to my
address@hidden             | conversation.   -- G. B. Shaw 

Attachment: bc
Description: Text document

reply via email to

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