From dd7a7eae8fdaaf82f22aca0458e21c965c99771c Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 20 May 2020 09:41:58 +0200 Subject: [PATCH] src/bin/proxmox-backup-manager.rs: add completion helper for gc-schedule --- src/bin/proxmox-backup-manager.rs | 3 ++- src/config/datastore.rs | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index 6369eb6a..bbc27659 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -488,7 +488,8 @@ fn datastore_commands() -> CommandLineInterface { CliCommand::new(&api2::config::datastore::API_METHOD_UPDATE_DATASTORE) .arg_param(&["name"]) .completion_cb("name", config::datastore::complete_datastore_name) - ) + .completion_cb("gc-schedule", config::datastore::complete_calendar_event) + ) .insert("remove", CliCommand::new(&api2::config::datastore::API_METHOD_DELETE_DATASTORE) .arg_param(&["name"]) diff --git a/src/config/datastore.rs b/src/config/datastore.rs index 65fe1838..52d7273b 100644 --- a/src/config/datastore.rs +++ b/src/config/datastore.rs @@ -123,3 +123,9 @@ pub fn complete_acl_path(_arg: &str, _param: &HashMap) -> Vec) -> Vec { + // just give some hints about possible values + ["minutely", "hourly", "daily", "mon..fri", "0:0"] + .iter().map(|s| String::from(*s)).collect() +}