[Top][All Lists]

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

Re: Non-filename completions containing slashes and -o filenames

From: Chet Ramey
Subject: Re: Non-filename completions containing slashes and -o filenames
Date: Sun, 14 Jun 2009 22:30:02 -0400
User-agent: Thunderbird (Macintosh/20090302)

Ville Skyttä wrote:
> Hello,
> Apologies if this is not an appropriate list to post a question like this 
> (pointers elsewhere welcome), but here goes:
> I'm trying to figure out how to do the right thing with non-filename 
> completions containing slashes in a function that was passed to complete 
> along 
> with -o filenames.

I can't think, off the top of my head, how the completion function is
supposed to distinguish between the two.  There's no real difference
between a string with slashes and a filename -- they are identical.
You could, I suppose, stat the arguments to see which correspond to
real pathnames, but that isn't guaranteed accurate.  Since you don't
have control over what is passed to the completion function, trying to
quote the slashes in a non-pathname argument won't work, either.


``The lyf so short, the craft so long to lerne.'' - Chaucer

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

reply via email to

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