I hit a snag in filename completion that I don't see reported
in Debian's BTS, but that upstream apparently fixed last year:
https://github.com/scop/bash-completion/issues/509

AFAICT bookworm contains the fix, which I have applied to
all my systems (original-find is bullseye's):

--- /usr/share/bash-completion/completions/find 2022-04-03 00:00:00.000000000 
-0500
+++ /usr/share/bash-completion/original-find    2020-08-12 07:14:35.000000000 
-0500
@@ -10,7 +10,6 @@
     local i
     for i in ${!words[*]}; do
         if [[ ${words[i]} == -@(exec|ok)?(dir) ]]; then
-            ((cword > i)) || break
             _command_offset $((i + 1))
             return
         fi

The bullseye bug is that filename completion of the path
argument here will work with:
  $ find incomplete/path<TAB> -type f -print
but fail, emitting "COMP_POINT: substring expression < 0", with:
  $ find incomplete/path<TAB> -type f -exec

My question is whether I should post the bug and its fix to BTS
as a service to stable users, or forget it as bookworm is fixed.

Cheers,
David.

Reply via email to