use complete_file_name from proxmox-router 1.1
This commit is contained in:
@ -33,7 +33,7 @@ proxmox-fuse = "0.1.1"
|
||||
proxmox-http = { version = "0.5.0", features = [ "client", "http-helpers", "websocket" ] }
|
||||
proxmox-io = { version = "1", features = [ "tokio" ] }
|
||||
proxmox-lang = "1"
|
||||
proxmox-router = { version = "1", features = [ "cli" ] }
|
||||
proxmox-router = { version = "1.1", features = [ "cli" ] }
|
||||
proxmox-schema = "1"
|
||||
proxmox-time = "1"
|
||||
pxar = { version = "0.10.1", features = [ "tokio-io" ] }
|
||||
|
@ -79,13 +79,13 @@ pub fn catalog_shell_cli() -> CommandLineInterface {
|
||||
"restore-selected",
|
||||
CliCommand::new(&API_METHOD_RESTORE_SELECTED_COMMAND)
|
||||
.arg_param(&["target"])
|
||||
.completion_cb("target", pbs_tools::fs::complete_file_name),
|
||||
.completion_cb("target", cli::complete_file_name),
|
||||
)
|
||||
.insert(
|
||||
"restore",
|
||||
CliCommand::new(&API_METHOD_RESTORE_COMMAND)
|
||||
.arg_param(&["target"])
|
||||
.completion_cb("target", pbs_tools::fs::complete_file_name),
|
||||
.completion_cb("target", cli::complete_file_name),
|
||||
)
|
||||
.insert(
|
||||
"find",
|
||||
|
@ -11,7 +11,7 @@ use serde_json::{json, Value};
|
||||
use xdg::BaseDirectories;
|
||||
|
||||
use proxmox_schema::*;
|
||||
use proxmox_router::cli::shellword_split;
|
||||
use proxmox_router::cli::{complete_file_name, shellword_split};
|
||||
use proxmox::tools::fs::file_get_json;
|
||||
|
||||
use pbs_api_types::{BACKUP_REPO_URL, Authid, UserWithTokens};
|
||||
@ -411,7 +411,7 @@ pub fn complete_backup_source(arg: &str, param: &HashMap<String, String>) -> Vec
|
||||
return result;
|
||||
}
|
||||
|
||||
let files = pbs_tools::fs::complete_file_name(data[1], param);
|
||||
let files = complete_file_name(data[1], param);
|
||||
|
||||
for file in files {
|
||||
result.push(format!("{}:{}", data[0], file));
|
||||
|
Reference in New Issue
Block a user