use proxmox 0.1.9 with new cli command helpers
This commit is contained in:
		@ -132,7 +132,7 @@ impl Shell {
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
            let _ = handle_command(helper.cmd_def(), "", args);
 | 
			
		||||
            let _ = handle_command(helper.cmd_def(), "", args, None);
 | 
			
		||||
            self.rl.add_history_entry(line);
 | 
			
		||||
            self.update_prompt()?;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -83,7 +83,7 @@ fn main() -> Result<(), Error> {
 | 
			
		||||
 | 
			
		||||
        let args = shellword_split(&line)?;
 | 
			
		||||
 | 
			
		||||
        let _ = handle_command(helper.cmd_def(), "", args);
 | 
			
		||||
        let _ = handle_command(helper.cmd_def(), "", args, None);
 | 
			
		||||
 | 
			
		||||
        rl.add_history_entry(line);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -2378,5 +2378,7 @@ fn main() {
 | 
			
		||||
        .insert("catalog", catalog_mgmt_cli())
 | 
			
		||||
        .insert("task", task_mgmt_cli());
 | 
			
		||||
 | 
			
		||||
    proxmox_backup::tools::runtime::main(run_cli_command(cmd_def));
 | 
			
		||||
    run_cli_command(cmd_def, Some(|future| {
 | 
			
		||||
        proxmox_backup::tools::runtime::main(future)
 | 
			
		||||
    }));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -465,7 +465,7 @@ fn main() {
 | 
			
		||||
                .completion_cb("remote-store", complete_remote_datastore_name)
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
    proxmox_backup::tools::runtime::main(run_cli_command(cmd_def));
 | 
			
		||||
    proxmox_backup::tools::runtime::main(run_async_cli_command(cmd_def));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// shell completion helper
 | 
			
		||||
 | 
			
		||||
@ -519,5 +519,5 @@ fn main() {
 | 
			
		||||
            .completion_cb("archive", tools::complete_file_name)
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
    proxmox_backup::tools::runtime::main(run_cli_command(cmd_def));
 | 
			
		||||
    run_cli_command(cmd_def, None);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user