[Top][All Lists]

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

Re: bash-4.0 filename completion

From: Chet Ramey
Subject: Re: bash-4.0 filename completion
Date: Fri, 20 Mar 2009 21:08:10 -0400
User-agent: Thunderbird (Macintosh/20090302)

Krzysiek Pawlik wrote:
> Chet Ramey wrote:
>> I can't reproduce this.  I get a\ (escaped space), and then listing of
>> possible completions with subsequent TABs.  This is the correct behavior.
>> Could it have something to do with any completion functions you have
>> defined?
> Yes, it does. When I tested without any completion functions it works as
> expected. Any tips on how to debug this issue? Setting set -x in .bashrc 
> produces:

This might be the result of changes to the bash readline support function
that dequotes filenames.  That function was changed as the result of bug
reports against bash-3.2 to better implement shell quoting.  That means:

1.  Backslashes should not be stripped within single quotes.

2.  Backslashes should only be stripped within double quotes if they're
    followed by one of $ ` " \ <newline>

This affects the behavior of the quote_readline function (or the contexts
in which it should be called) and the behavior of compgen when it receives
arguments with quotes.  In this case, it looks like the backslash is
preserved since compgen gets an argument with explicit single quotes.


``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]