From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Lukas Wagner <l.wagner@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] applied: [PATCH proxmox-backup] pbs-client: fix bash autocompletion for archive-files
Date: Thu, 20 Oct 2022 13:21:50 +0200 [thread overview]
Message-ID: <20221020112150.ufitu7uxnjw7kjrf@casey.proxmox.com> (raw)
In-Reply-To: <20221020092250.56128-1-l.wagner@proxmox.com>
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 <snapshot> <TAB>
>
> 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 <l.wagner@proxmox.com>
> ---
> 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<String, String>) -> 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
prev parent reply other threads:[~2022-10-20 11:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 9:22 [pbs-devel] " Lukas Wagner
2022-10-20 11:21 ` Wolfgang Bumiller [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=20221020112150.ufitu7uxnjw7kjrf@casey.proxmox.com \
--to=w.bumiller@proxmox.com \
--cc=l.wagner@proxmox.com \
--cc=pbs-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