#931308 bash: given path disappears with autocompletion

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
Philipp Marek
Date:
2024-04-29 13:39:03 UTC
Severity:
normal
#931308#5
Date:
2019-07-01 12:32:18 UTC
From:
To:
To reproduce:

- Go into some directory with write permissions (eg /tmp)
- do # mkdir foo bar bar/boz bar/baz-$'\n'.
- do # cd foo
- enter 'ls -la ../ba' and press <tab> to complete entries in there

Expected result:
I get a list of entries, with "boz" and "baz-?" to choose from.

Actual result:
<tab> removes the whole parameter, and I end up with "ls -la .".


I know that a newline in a filename is a bad thing (I had a bug in a
"find -printf" line ;), but still it shouldn't break that way.