In bash, if i type /usr/sbin/debfoster and then hit TAB, i see the
following error on stderr (four times):
bash: have: command not found
The bash tab completion rules do indeed try to call something named
"have" -- but maybe they're ancient?
```
$ head /usr/share/bash-completion/completions/debfoster
# -*- sh -*-
# Provided by Eric Hansander <ehdr@users.sourceforge.net> in
# <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349035>
have debfoster &&
_debfoster()
{
local cur prev options
$
```
Regards,
have used to be defined for bash_completion snippets and got deprecated some time one year ago. Sadly without any warning or obvious informaion, and now it's gone. Does your script work again when you replace have with _comp_have_command? Greetings Marc
Hi Marc-- Thanks for the quick feedback here. That seems unfortunate :( I'm afraid it doesn't. there is some sort of test in the final line of /usr/share/bash-completion/completions/debfoster that reads like it might be related to the old "have" functionality: ``` test "$have" && complete -F _debfoster $default debfoster ``` but i don't know the history of bash-completion well enough to know what this means, or whether/how to rewrite this completion script myself.
Control: tags -1 help Thanks Neither do I. Tagging this bug help, but I might get around to take a look sooner. Thankfully it's only an annoyance. Greetings Marc
Try this patch:--- original 2025-05-24 10:45:01.169219431 +0200 +++ /usr/share/bash-completion/completions/debfoster 2025-05-24 10:45:35.865115014 +0200 @@ -3,7 +3,7 @@ # Provided by Eric Hansander <ehdr@users.sourceforge.net> in # <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349035>
Hi Marc-- Yes, this patch looks like it works for me. thanks!
Hello, Bug #1106336 in debfoster reported by you has been fixed in the Git repository and is awaiting an upload. You can see the commit message below and you can check the diff of the fix at: https://salsa.debian.org/debian/debfoster/-/commit/aa5e617ad5be2a643e675c33303c07acedbc01bc ------------------------------------------------------------------------ replace "have" with "_comp_have_command" in bash_completion Thanks: Daniel Kahn Gillmor Closes: #1106336 ------------------------------------------------------------------------ (this message was generated automatically) -- Greetings https://bugs.debian.org/1106336