#983845 doas does not autocomplete apt

Package:
doas
Source:
doas
Description:
transitional package
Submitter:
Ferdinand
Date:
2025-05-18 12:42:02 UTC
Severity:
wishlist
#983845#5
Date:
2021-03-02 08:23:12 UTC
From:
To:
Dear Maintainer,

    * What led up to the situation?
Trying to use autocomplete for apt with doas

    * What exactly did you do (or not do) that was effective (or
      ineffective)?
doas ap TAB
doas apt upd TAB

    * What was the outcome of this action?
both attempts do nothing
    * What outcome did you expect instead?
I expected tab completion to complete my commands to apt and to apt update

Completion works fine with paths, not with apt though.

With FreeBSD you add 'complete -cf doas' to ~/.bashrc, but that does not
work with Debian.

#983845#10
Date:
2021-03-03 16:44:08 UTC
From:
To:
Hello!

Autocompletion works for me on zsh.
Can you please send me your shell config so I can try it
on my computer?

#983845#15
Date:
2021-03-03 19:57:58 UTC
From:
To:
Actually, nevermind.
I think bash-completion doesn't support doas yet.
I have just opened an issue on the git repo:
https://github.com/scop/bash-completion/issues/505

#983845#20
Date:
2025-05-18 12:38:32 UTC
From:
To:
This works alright on debian 12 if you place the following in your .bashrc

complete -F _command doas
complete -F _root_command doas