public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Shan Shaji" <s.shaji@proxmox.com>
To: "Lukas Wagner" <l.wagner@proxmox.com>, <pdm-devel@lists.proxmox.com>
Subject: Re: [PATCH datacenter-manager] cli: fix zsh shell completion definitions
Date: Tue, 24 Feb 2026 12:17:12 +0100	[thread overview]
Message-ID: <DGN5EU2Q0JEJ.A24H9X2OHAL6@proxmox.com> (raw)
In-Reply-To: <20260224090205.15379-1-l.wagner@proxmox.com>

Applied and tested the changes. To test it, i have created a new user on my VM
with ZSH shell. Both `admin` and `client` CLI completions are working fine now.

Without the above change, the completions doesn't work and i was getting the
following error:

```
_proxmox-datacenter-manager-admin:8: command not found: n
``` 

Tested-by: Shan Shaji <s.shaji@proxmox.com>

On Tue Feb 24, 2026 at 10:02 AM CET, Lukas Wagner wrote:
> To continue the `compadd` call on the next line, we need a literal \
> and then a newline (\n), meaning we need to first escape the \ and then
> add the newline character.
>
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
> ---
>  cli/completions/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cli/completions/Makefile b/cli/completions/Makefile
> index 5eceaea7..5d2a814f 100644
> --- a/cli/completions/Makefile
> +++ b/cli/completions/Makefile
> @@ -20,7 +20,7 @@ _%:
>  	@printf '    cmd=$${words[1]}\n' >>$@.tmp
>  	@printf '    curr=$${words[cwords]}\n' >>$@.tmp
>  	@printf '    prev=$${words[cwords-1]}\n' >>$@.tmp
> -	@printf '    compadd -- $$(COMP_CWORD="$$cwords" COMP_LINE="$$line" COMP_POINT="$$point" \\n' >>$@.tmp
> +	@printf '    compadd -- $$(COMP_CWORD="$$cwords" COMP_LINE="$$line" COMP_POINT="$$point" \\\n' >>$@.tmp
>  	@printf '        $* bashcomplete "$$cmd" "$$curr" "$$prev")\n' >>$@.tmp
>  	@printf '}\n' >>$@.tmp
>  	mv $@.tmp $@





      reply	other threads:[~2026-02-24 11:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24  9:02 Lukas Wagner
2026-02-24 11:17 ` Shan Shaji [this message]

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=DGN5EU2Q0JEJ.A24H9X2OHAL6@proxmox.com \
    --to=s.shaji@proxmox.com \
    --cc=l.wagner@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal