> Bash Version: 4.2
> Patch Level: 7
> Release Status: release
> 
> Description:
>         When enter in console "ls $HOME/" and press TAB for
> completion, then bash add slash for special characters like $ { }
>         When I back to wersion 4.1_p10 then problem is gone. Problem
> also exists with 4.2_p6 and 4.2_p1 (these veriosn I have checked).

The difference is that bash-4.1 expanded $HOME and left the expansion
as part of the replacement text.  Bash-4.2 tries to leave what the
user typed alone, but that leads to an inherently ambiguous situation:
when do you quote the `$' in a filename (or, in this case, a directory
name)?  It could be a shell variable, and it could be a character in
the filename. 

The bash-4.1 solution, though it modified what the user typed, did not
result in any ambiguity.  A filename was a filename, and if it contained
characters that needed to be quoted, readline did so.

I might be able to finesse this issue and retain the bash-4.2 behavior
by changing state when rewriting the directory name for opendir(2), but
I have to think about it some more.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to