all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shan Shaji <s.shaji@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 1/2] fix: cli: replace completion file suffix from `.bc` to `.bash`
Date: Fri,  6 Feb 2026 17:35:18 +0100	[thread overview]
Message-ID: <20260206163519.218579-2-s.shaji@proxmox.com> (raw)
In-Reply-To: <20260206163519.218579-1-s.shaji@proxmox.com>

The completions were not working because of the file name extension of
the completion file. According to the `bash-completion` documentation,
completion file needs to have a `.bash` suffix or without any suffix.

documentation 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.

Since the .bash extension works on the current 2.16 bash-completion
version available in debian, replaced the `.bc` suffix with `.bash`

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 Makefile                                         | 2 +-
 cli/completions/Makefile                         | 2 +-
 debian/proxmox-datacenter-manager-client.install | 2 +-
 debian/proxmox-datacenter-manager.install        | 8 ++++----
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 91fe684..b10fed7 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ COMPILED_BINS := \
 	$(addprefix $(COMPILEDIR)/,$(USR_BIN) $(USR_SBIN) $(SERVICE_BIN) $(INTERNAL_SERVICE_BIN))
 
 # completion helper get generated on build
-BASH_COMPLETIONS := $(addsuffix .bc,$(USR_BIN) $(USR_SBIN) $(SERVICE_BIN))
+BASH_COMPLETIONS := $(addsuffix .bash,$(USR_BIN) $(USR_SBIN) $(SERVICE_BIN))
 ZSH_COMPLETIONS := $(addprefix _,$(USR_BIN) $(USR_SBIN) $(SERVICE_BIN))
 SHELL_COMPLETION_FILES := $(addprefix $(COMPLETION_DIR)/,$(BASH_COMPLETIONS) $(ZSH_COMPLETIONS))
 
diff --git a/cli/completions/Makefile b/cli/completions/Makefile
index 5972355..5e7b2f7 100644
--- a/cli/completions/Makefile
+++ b/cli/completions/Makefile
@@ -2,7 +2,7 @@
 all:
 
 # bash completion
-%.bc:
+%.bash:
 	@echo "creating bash completion definition for $*"
 	@printf '# $* bash completion\n\n' >$@.tmp
 	@printf "complete -C '$* bashcomplete' $*\n" >>$@.tmp
diff --git a/debian/proxmox-datacenter-manager-client.install b/debian/proxmox-datacenter-manager-client.install
index 1844173..eb9d782 100644
--- a/debian/proxmox-datacenter-manager-client.install
+++ b/debian/proxmox-datacenter-manager-client.install
@@ -1,4 +1,4 @@
 usr/bin/proxmox-datacenter-manager-client
-usr/share/bash-completion/completions/proxmox-datacenter-manager-client.bc
+usr/share/bash-completion/completions/proxmox-datacenter-manager-client.bash
 usr/share/man/man1/proxmox-datacenter-manager-client.1
 usr/share/zsh/vendor-completions/_proxmox-datacenter-manager-client
diff --git a/debian/proxmox-datacenter-manager.install b/debian/proxmox-datacenter-manager.install
index 499e07f..7942146 100644
--- a/debian/proxmox-datacenter-manager.install
+++ b/debian/proxmox-datacenter-manager.install
@@ -10,10 +10,10 @@ usr/libexec/proxmox/proxmox-datacenter-manager-daily-update
 usr/libexec/proxmox/proxmox-datacenter-privileged-api
 usr/sbin/pdmAtoB
 usr/sbin/proxmox-datacenter-manager-admin
-usr/share/bash-completion/completions/pdmAtoB.bc
-usr/share/bash-completion/completions/proxmox-datacenter-api.bc
-usr/share/bash-completion/completions/proxmox-datacenter-manager-admin.bc
-usr/share/bash-completion/completions/proxmox-datacenter-privileged-api.bc
+usr/share/bash-completion/completions/pdmAtoB.bash
+usr/share/bash-completion/completions/proxmox-datacenter-api.bash
+usr/share/bash-completion/completions/proxmox-datacenter-manager-admin.bash
+usr/share/bash-completion/completions/proxmox-datacenter-privileged-api.bash
 usr/share/man/man1/proxmox-datacenter-api.1
 usr/share/man/man1/proxmox-datacenter-manager-admin.1
 usr/share/man/man1/proxmox-datacenter-privileged-api.1
-- 
2.47.3





  reply	other threads:[~2026-02-06 16:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Shan Shaji [this message]
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-2-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 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