#1061831 restricted tab completion broken for directory names with blanks

Package:
bash-completion
Source:
bash-completion
Submitter:
Michael Kiermaier
Date:
2025-01-12 07:27:03 UTC
Severity:
normal
Tags:
#1061831#5
Date:
2024-01-29 20:42:23 UTC
From:
To:
I'm in bash. In the current directory there is a subdirectory named
	dir\ blank
Now I type
$ unzip dir\ bla
and then I press the tab key twice for autocomplete. But the completion
doesn't work.

Notes:
* The completion does not work no matter if there is a zip file in
   dir\ blank or not.
* When I do the same for 'ls' instead of 'unzip', completion works.
* The problem is not specific for the unzip command. My impression is
   that any command with a restricted list of completions produces this
   bug, like okular, xdvi etc.
* Autocomplete works as long as the entered part does not contain the
   blank. For example, tab-completion at
   $ unzip dir
   works, but at
   $ unzip dir\
   it does not.

A variant of this bug has been discussed here:
https://lists.debian.org/debian-user/2024/01/msg01380.html

The above has been produced in konsole in KDE, but I don't think it is
relevant.

I'm on Debian 12 (stable) amd64.

Package versions:

konsole  4:22.12.3-1
bash  5.2.15-2+b2
bash-completion   1:2.11-6

$ uname -a
Linux goblin 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1
(2023-12-30) x86_64 GNU/Linux