Re: Bug: Tab completion for pdf files with blanks in path

2024-01-29 Thread Michael Kiermaier

On 1/29/24 20:59, Greg Wooledge wrote:

complete -r isn't intended as a workaround.  It's intended as a diagnostic
step.

Seeing the problem go away when completion goes away means that the
problem is *in* the completion.  Thus, he knows which package to file
a bug report against.


Yes, I understood that 'complete -r' is for diagnostics.

I've submitted this bug report now:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061831

Thank you again for your help.



Re: Bug: Tab completion for pdf files with blanks in path

2024-01-29 Thread Michael Kiermaier

On 1/29/24 18:59, Greg Wooledge wrote:

On Tue, Jan 30, 2024 at 12:05:24AM +0700, Max Nikulin wrote:

On 29/01/2024 19:40, Greg Wooledge wrote:

Let me test that as well

[...]

unicorn:/tmp$ xyz dir\ with\ blanks/dir2/file


"okular" is important here. Only limited set of file name suffixes are
allowed for some commands. You do not need to have okular installed,
completion rules are part of bash-completion.


That's my point as well.  I'm trying to get the OP to determine whether
it's the programmable completion for "okular" in particular that's at
fault, or bash itself (hint: it's not).


Thank you for your responses! After 'complete -r' the problem
disappears. I should add that I never touched the autocomplete settings.

I will submit a bug report for the package bash-completion.



Bug: Tab completion for pdf files with blanks in path

2024-01-29 Thread Michael Kiermaier

Dear Debian Team,

I think I found a bug, and I'm writing to this list as I don't know the
associated package (according to https://www.debian.org/Bugs/Reporting).
I'm experiencing this bug in konsole (KDE's terminal emulator), but the
same bug has been reported here
https://askubuntu.com/q/133
in xfce-terminal on Ubuntu 20.04, so I don't think it is a konsole or a
KDE bug. Maybe the affected package is bash-autocompletion, but I don't
know for sure.


I would like to run okular opening the pdf file
~/dir1\ with\ blanks/dir2/file.pdf
via command line. In konsole I type
okular ~/dir1\ with\ blanks/
and hit the tab key twice for autocomplete. But I won't get offered
dir2. After adding more letters like
okular ~/dir1\ with\ blanks/di
to make the completion to dir2 unique, nothing happens at all after
hitting tab (twice). Only after spelling out the complete directory as
okular ~/dir1\ with\ blanks/dir2
and then hitting tab, autocomplete works again as expected.


My feeling is that there are two components which together trigger this bug.

(1) Blanks in the path.
The blanks in dir1\ with\ blanks, because renaming it to something
without a blank like dir1 makes the problem disappear. Also, note that
adding a blank to dir2 is not a problem.

(2) Automatic filtering of autocompletion candidates.
Starting the command with 'konsole' and then hitting tab will only
complete to pdf files. When I do the same with 'ls' instead of 'okular',
no filtering takes place, and the above problem disappears (meaning that
typing
ls ~/dir1\ with\ blanks/
and hitting TAB twice will offer me dir2.


Relevant packages:

I'm on Debian 12 (stable) amd64.

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

Thank you.

Best,

~Michael