From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 5E57F1FF396 for ; Thu, 23 May 2024 11:32:37 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 96A031C34D; Thu, 23 May 2024 11:32:55 +0200 (CEST) Message-ID: <7e0644d7-bf57-4703-aa89-30cebc4da61f@proxmox.com> Date: Thu, 23 May 2024 11:32:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: Proxmox Backup Server development discussion , Christian Ebner References: <20240514103421.289431-1-c.ebner@proxmox.com> <20240514103421.289431-57-c.ebner@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20240514103421.289431-57-c.ebner@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.234 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [case.edu] URI_DOTEDU 0.5 Has .edu URI Subject: Re: [pbs-devel] [PATCH v6 proxmox-backup 56/65] test-suite: add bin to deb, add shell completions X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" adding this is quite nice, but i'm unsure if we want to add it by default to the main package? maybe a seperate one? but not an issue either way for me On 5/14/24 12:34, Christian Ebner wrote: > Adds the required files for bash and zsh completion and packages the > binary to be included in the proxmox-backup-client debian package. > > Signed-off-by: Christian Ebner > --- > Makefile | 13 ++++++++----- > debian/proxmox-backup-client.bash-completion | 1 + > debian/proxmox-backup-client.install | 2 ++ > debian/proxmox-backup-test-suite.bc | 8 ++++++++ > zsh-completions/_proxmox-backup-test-suite | 13 +++++++++++++ > 5 files changed, 32 insertions(+), 5 deletions(-) > create mode 100644 debian/proxmox-backup-test-suite.bc > create mode 100644 zsh-completions/_proxmox-backup-test-suite > > diff --git a/Makefile b/Makefile > index 03e938767..76529921b 100644 > --- a/Makefile > +++ b/Makefile > @@ -8,11 +8,12 @@ SUBDIRS := etc www docs templates > > # Binaries usable by users > USR_BIN := \ > - proxmox-backup-client \ > - proxmox-file-restore \ > - pxar \ > - proxmox-tape \ > - pmtx \ > + proxmox-backup-client \ > + proxmox-backup-test-suite \ > + proxmox-file-restore \ > + pxar \ > + proxmox-tape \ > + pmtx \ > pmt > > # Binaries usable by admins > @@ -165,6 +166,8 @@ $(COMPILED_BINS) $(COMPILEDIR)/dump-catalog-shell-cli $(COMPILEDIR)/docgen: .do- > --bin proxmox-backup-client \ > --bin dump-catalog-shell-cli \ > --bin proxmox-backup-debug \ > + --package proxmox-backup-test-suite \ > + --bin proxmox-backup-test-suite \ > --package proxmox-file-restore \ > --bin proxmox-file-restore \ > --package pxar-bin \ > diff --git a/debian/proxmox-backup-client.bash-completion b/debian/proxmox-backup-client.bash-completion > index 437360175..c4ff02ae6 100644 > --- a/debian/proxmox-backup-client.bash-completion > +++ b/debian/proxmox-backup-client.bash-completion > @@ -1,2 +1,3 @@ > debian/proxmox-backup-client.bc proxmox-backup-client > +debian/proxmox-backup-test-suite.bc proxmox-backup-test-suite > debian/pxar.bc pxar > diff --git a/debian/proxmox-backup-client.install b/debian/proxmox-backup-client.install > index 74b568f17..0eb859757 100644 > --- a/debian/proxmox-backup-client.install > +++ b/debian/proxmox-backup-client.install > @@ -1,6 +1,8 @@ > usr/bin/proxmox-backup-client > +usr/bin/proxmox-backup-test-suite > usr/bin/pxar > usr/share/man/man1/proxmox-backup-client.1 > usr/share/man/man1/pxar.1 > usr/share/zsh/vendor-completions/_proxmox-backup-client > +usr/share/zsh/vendor-completions/_proxmox-backup-test-suite > usr/share/zsh/vendor-completions/_pxar > diff --git a/debian/proxmox-backup-test-suite.bc b/debian/proxmox-backup-test-suite.bc > new file mode 100644 > index 000000000..2686d7eaa > --- /dev/null > +++ b/debian/proxmox-backup-test-suite.bc > @@ -0,0 +1,8 @@ > +# proxmox-backup-test-suite bash completion > + > +# see http://tiswww.case.edu/php/chet/bash/FAQ > +# and __ltrim_colon_completions() in /usr/share/bash-completion/bash_completion > +# this modifies global var, but I found no better way > +COMP_WORDBREAKS=${COMP_WORDBREAKS//:} > + > +complete -C 'proxmox-backup-test-suite bashcomplete' proxmox-backup-test-suite > diff --git a/zsh-completions/_proxmox-backup-test-suite b/zsh-completions/_proxmox-backup-test-suite > new file mode 100644 > index 000000000..72ebcea5f > --- /dev/null > +++ b/zsh-completions/_proxmox-backup-test-suite > @@ -0,0 +1,13 @@ > +#compdef _proxmox-backup-test-suite() proxmox-backup-test-suite > + > +function _proxmox-backup-test-suite() { > + local cwords line point cmd curr prev > + cwords=${#words[@]} > + line=$words > + point=${#line} > + cmd=${words[1]} > + curr=${words[cwords]} > + prev=${words[cwords-1]} > + compadd -- $(COMP_CWORD="$cwords" COMP_LINE="$line" COMP_POINT="$point" \ > + proxmox-backup-test-suite bashcomplete "$cmd" "$curr" "$prev") > +} _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel