mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-01-26 10:03:55 +03:00
catar: improve bash completion
This commit is contained in:
parent
29f34b8e1a
commit
ce7ba139f1
@ -2,6 +2,7 @@ extern crate proxmox_backup;
|
|||||||
|
|
||||||
use failure::*;
|
use failure::*;
|
||||||
|
|
||||||
|
use proxmox_backup::tools;
|
||||||
use proxmox_backup::cli::command::*;
|
use proxmox_backup::cli::command::*;
|
||||||
use proxmox_backup::api::schema::*;
|
use proxmox_backup::api::schema::*;
|
||||||
use proxmox_backup::api::router::*;
|
use proxmox_backup::api::router::*;
|
||||||
@ -151,7 +152,9 @@ fn main() {
|
|||||||
.required("source", StringSchema::new("Source directory."))
|
.required("source", StringSchema::new("Source directory."))
|
||||||
))
|
))
|
||||||
.arg_param(vec!["archive", "source"])
|
.arg_param(vec!["archive", "source"])
|
||||||
.into()
|
.completion_cb("archive", tools::complete_file_name)
|
||||||
|
.completion_cb("source", tools::complete_file_name)
|
||||||
|
.into()
|
||||||
)
|
)
|
||||||
.insert("list", CliCommand::new(
|
.insert("list", CliCommand::new(
|
||||||
ApiMethod::new(
|
ApiMethod::new(
|
||||||
@ -160,6 +163,7 @@ fn main() {
|
|||||||
.required("archive", StringSchema::new("Archive name."))
|
.required("archive", StringSchema::new("Archive name."))
|
||||||
))
|
))
|
||||||
.arg_param(vec!["archive"])
|
.arg_param(vec!["archive"])
|
||||||
|
.completion_cb("archive", tools::complete_file_name)
|
||||||
.into()
|
.into()
|
||||||
)
|
)
|
||||||
.insert("dump", CliCommand::new(
|
.insert("dump", CliCommand::new(
|
||||||
@ -169,6 +173,7 @@ fn main() {
|
|||||||
.required("archive", StringSchema::new("Archive name."))
|
.required("archive", StringSchema::new("Archive name."))
|
||||||
))
|
))
|
||||||
.arg_param(vec!["archive"])
|
.arg_param(vec!["archive"])
|
||||||
|
.completion_cb("archive", tools::complete_file_name)
|
||||||
.into()
|
.into()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user