src/bin/proxmox-backup-manager.rs: add completion helper for gc-schedule
This commit is contained in:
		| @ -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"]) | ||||
|  | ||||
| @ -123,3 +123,9 @@ pub fn complete_acl_path(_arg: &str, _param: &HashMap<String, String>) -> Vec<St | ||||
|  | ||||
|     list | ||||
| } | ||||
|  | ||||
| pub fn complete_calendar_event(_arg: &str, _param: &HashMap<String, String>) -> Vec<String> { | ||||
|     // just give some hints about possible values | ||||
|     ["minutely", "hourly", "daily", "mon..fri", "0:0"] | ||||
|         .iter().map(|s| String::from(*s)).collect() | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user