On Mon, Jan 29, 2024 at 09:32:18AM +0100, Michael Kiermaier wrote:
> 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

My first question would be: does the problem still occur if you disable
bash-completion?  Open a new instance of bash and run "complete -r" to
remove all programmable completions.  See if the problem still occurs.
Then close that instance of bash.

>       okular ~/dir1\ with\ blanks/di
> to make the completion to dir2 unique

Oh, there's more than one subdir?  Let me test that as well....

Yeah, even with both dir1 and dir2 (each containing a file), I still get
the expected behavior in bash without bash-completion in the picture.

unicorn:~$ cd /tmp
unicorn:/tmp$ mkdir -p 'dir with blanks'/dir2
unicorn:/tmp$ touch "$_"/file

(first experiments with tab completion, not shown)

unicorn:/tmp$ mkdir -p 'dir with blanks'/dir1
unicorn:/tmp$ touch "$_"/otherfile
unicorn:/tmp$ xyz dir\ with\ blanks/dir
dir1/ dir2/ 
unicorn:/tmp$ xyz dir\ with\ blanks/dir2/file 

I'm assuming whatever issue you're seeing is the result of a
bash-completion bug, not a bash bug.  If you can confirm that, then
you'll know which package to file a bug against.

Reply via email to