On Fri, Jun 13, 2003 at 07:32:43PM +0900, Robert Klemme wrote:
> bash (and I belive tcsh) have programmable completion that does exactly
> what you are asking for.  Maybe a look into their source code helps.

But bash (and probably tcsh too) uses readline...

-- 
 _           _                             
| |__   __ _| |_ ___ _ __ ___   __ _ _ __  
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ 
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
	Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Linux: The OS people choose without $200,000,000 of persuasion.
	-- Mike Coleman