From: Shan Shaji <s.shaji@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 0/2] fix: cli: bash completions not working for CLI tools
Date: Fri, 6 Feb 2026 17:35:17 +0100 [thread overview]
Message-ID: <20260206163519.218579-1-s.shaji@proxmox.com> (raw)
Shell completions for the CLIs were not working because the completion
files were installed with the `.bc` extension.
According to the bash-completion documentation [1], completion files should
either use the `.bash` extension or no extension at all. Debian currently ships
bash-completion 2.16 [2]. Since installing files without an extension is
planned to be deprecated in >=2.18, use the `.bash` extension for
compatibility with future versions.
documentaion quote:
> The completion filename for command foo in this directory should be foo.bash.
> Unsuffixed foo also works, but it is deprecated in >= 2.18.
Passing the `bashcomplete` argument to proxmox-datacenter-api and
proxmox-datacenter-privileged-api results in an error instead of generating
completions. Since these binaries are systemd-managed service executables
rather than user facing CLI tools, providing bash completion helpers might not
be useful. Since i was not sure why we had completions for the same
i added it as another patch. Please correct me if i have missed anything.
[1]- https://github.com/scop/bash-completion/blob/06547b33f6de3b6f8ba730f00e7f585297a31b4f/README.md?plain=1#L184
[2]- https://packages.debian.org/en/trixie/bash-completion
Testing
=======
bash-completion: v2.16
I have tested by installing the completion files with .bash extension and
without any extension. In both cases, the completion worked correctly.
Shan Shaji (2):
fix: cli: replace completion file suffix from `.bc` to `.bash`
fix: cli: remove completion files for service bins
Makefile | 4 ++--
cli/completions/Makefile | 2 +-
debian/proxmox-datacenter-manager-client.install | 2 +-
debian/proxmox-datacenter-manager.install | 8 ++------
4 files changed, 6 insertions(+), 10 deletions(-)
--
2.47.3
next reply other threads:[~2026-02-06 16:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 16:35 Shan Shaji [this message]
2026-02-06 16:35 ` [PATCH datacenter-manager 1/2] fix: cli: replace completion file suffix from `.bc` to `.bash` Shan Shaji
2026-02-06 16:35 ` [PATCH datacenter-manager 2/2] fix: cli: remove completion files for service bins Shan Shaji
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260206163519.218579-1-s.shaji@proxmox.com \
--to=s.shaji@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox