From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 0DBD38A69B for ; Thu, 20 Oct 2022 13:21:52 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E16DC7292 for ; Thu, 20 Oct 2022 13:21:51 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 20 Oct 2022 13:21:51 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 2556244ABC for ; Thu, 20 Oct 2022 13:21:51 +0200 (CEST) Date: Thu, 20 Oct 2022 13:21:50 +0200 From: Wolfgang Bumiller To: Lukas Wagner Cc: pbs-devel@lists.proxmox.com Message-ID: <20221020112150.ufitu7uxnjw7kjrf@casey.proxmox.com> References: <20221020092250.56128-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221020092250.56128-1-l.wagner@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.252 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 Subject: [pbs-devel] applied: [PATCH proxmox-backup] pbs-client: fix bash autocompletion for archive-files 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: , X-List-Received-Date: Thu, 20 Oct 2022 11:21:52 -0000 applied, thanks On Thu, Oct 20, 2022 at 11:22:50AM +0200, Lukas Wagner wrote: > Previously, autocompletion of archive names, for instance > in the case of > > $ proxmox-backup-client restore > > did not work if no namespace was provided via the --ns option. > The fix is to fall back to the root namespace if the option is > not provided by the user. > > Signed-off-by: Lukas Wagner > --- > pbs-client/src/tools/mod.rs | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/pbs-client/src/tools/mod.rs b/pbs-client/src/tools/mod.rs > index 50e76a49..fa1d5092 100644 > --- a/pbs-client/src/tools/mod.rs > +++ b/pbs-client/src/tools/mod.rs > @@ -297,7 +297,10 @@ pub async fn complete_server_file_name_do(param: &HashMap) -> Ve > Ok(v) => v, > _ => return result, > }, > - _ => return result, > + _ => { > + // If no namespace flag is provided, we assume the root namespace > + pbs_api_types::BackupNamespace::root() > + } > }; > > let query = json_object_to_query(json!({ > -- > 2.30.2