public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] pbs-client: fix bash autocompletion for archive-files
@ 2022-10-20  9:22 Lukas Wagner
  2022-10-20 11:21 ` [pbs-devel] applied: " Wolfgang Bumiller
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2022-10-20  9:22 UTC (permalink / raw)
  To: pbs-devel

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] pbs-client: fix bash autocompletion for archive-files
  2022-10-20  9:22 [pbs-devel] [PATCH proxmox-backup] pbs-client: fix bash autocompletion for archive-files Lukas Wagner
@ 2022-10-20 11:21 ` Wolfgang Bumiller
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bumiller @ 2022-10-20 11:21 UTC (permalink / raw)
  To: Lukas Wagner; +Cc: pbs-devel

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-20 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20  9:22 [pbs-devel] [PATCH proxmox-backup] pbs-client: fix bash autocompletion for archive-files Lukas Wagner
2022-10-20 11:21 ` [pbs-devel] applied: " Wolfgang Bumiller

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