bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] No bug, but a question


From: Chet Ramey
Subject: Re: [Bug-readline] No bug, but a question
Date: Thu, 17 Jul 2008 10:45:49 -0400
User-agent: Thunderbird 2.0.0.14 (Macintosh/20080421)

Julien Claassen wrote:
Hello Chet!
Thanks a lot for you answer. I now wrote my own generators for it. But the next problem arose: Filenames with spaces. I don't know how to handle this. Bash does it by escaping them like '\ '. I can think of a function doing that, but still the break character has to be space in general. When I approach this point from the start, I could possibly do something, because I stored my commands in a multibranch tree. But when I come from somewhere else, I don't know. Do you have some advise here as well?

Quoting is really application-dependent.  It's only a display issue,
since you don't want to quote filenames in other contexts (that's why you
have to dequote what you quote).  It's all in what the application can
parse.

Readline uses a quoting hook, rl_filename_quoting_function (there is a
dequoting hook, too) to let the application quote filenames when it finds
a filename character that appears in the value of the
rl_completer_quote_characters variable.  The bash implementation of that
hook is bashline.c:bash_quote_filename().

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]