bug-bash
[Top][All Lists]
Advanced

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

Re: preventing complete from putting trailing spaces


From: Chet Ramey
Subject: Re: preventing complete from putting trailing spaces
Date: Tue, 03 Jun 2003 17:07:54 -0400

> I'm trying to write a complete function that'll sometimes return
> directories and sometimes return files.  When it returns directories
> (with a trailing '/'), I don't want readline to place trailing spaces. 
> OTOH, when it returns files (with no trailing '/'), I do want it to
> place a trailing space.  How do I do this? 

Use the `-o filenames' option to complete when installing the compspec.
Then return the filenames and directory names as usual from the
completion function and let readline do the right thing.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )

Chet Ramey, ITS, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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