all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH datacenter-manager 0/2] fix: cli: bash completions not working for CLI tools
@ 2026-02-06 16:35 Shan Shaji
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Shan Shaji @ 2026-02-06 16:35 UTC (permalink / raw)
  To: pdm-devel

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-06 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-06 16:35 [PATCH datacenter-manager 0/2] fix: cli: bash completions not working for CLI tools Shan Shaji
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal