Comment 5 for bug 692554

Revision history for this message
Peter Cordes (peter-cordes) wrote : Re: Autocomplete fails on some filenames

Looked into this some, and I think I might have a fix. The problem is the backquote, and what we're seeing here is related to the reports of completion inside $( failing.

the progcomp code uses a lot of constructs like eval $z=$foo, to assign by reference to a variable whose name is stored as $z.
e.g.
z=myvar
foo='`test'
eval $z="$foo"
bash: unexpected EOF while looking for matching ``'
bash: syntax error: unexpected end of file

 The trick is to single-quote $foo, so parameter expansion doesn't happen on it at the same time as $z.
eval $z='$foo'
echo $myvar
`test

 I'll post a patch after I go through the file and fix what I find.