bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] completion with space in the dir/file name


From: Chet Ramey
Subject: Re: [Bug-readline] completion with space in the dir/file name
Date: Fri, 31 Jul 2009 10:48:34 -0400
User-agent: Thunderbird 2.0.0.22 (Macintosh/20090605)

gianp wrote:
> hello list,
> i'm using the readlib in my application to make a shell, it works ok, but
> if i've a dir or file name containing space like: "name dir/", the readlib
> completes the name, but if i want to continue with <TAB> for complete the
> files in the "name dir/" dir, that doesn't work, i think the code doesn't
> add an escape char for special chars like space.
> I use rl_completion_matches for handle a command generator and
> rl_attempted_completion_function for setting the function for completion,
> how can i solve this problem?

Readline offers granular control over quoting possible completions.  An
application indicates its desire to quote completions by setting
rl_filename_completion_desired to 1, indicates the characters that require
a completion to be quoted when they appear by assigning a value to
rl_filename_quote_characters, and supplies a function to perform any
application-specific quoting by setting rl_filename_quoting_function.

You should also look at rl_completer_quote_characters, which define quoted
strings for completion, and rl_filename_dequoting_function.

Chet


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

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




reply via email to

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