mirror of
				https://git.proxmox.com/git/proxmox
				synced 2025-11-04 02:33:26 +00:00 
			
		
		
		
	proxmox-api/src/cli/format.rs - generate_nested_usage: fix formating with empty prefix
This commit is contained in:
		
							parent
							
								
									d00a096851
								
							
						
					
					
						commit
						c9cec98ece
					
				@ -172,7 +172,11 @@ pub fn generate_nested_usage(
 | 
			
		||||
    let mut usage = String::new();
 | 
			
		||||
 | 
			
		||||
    for cmd in cmds {
 | 
			
		||||
        let new_prefix = format!("{} {}", prefix, cmd);
 | 
			
		||||
        let new_prefix = if prefix.is_empty() {
 | 
			
		||||
            String::from(cmd)
 | 
			
		||||
        } else {
 | 
			
		||||
            format!("{} {}", prefix, cmd)
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        match def.commands.get(cmd).unwrap() {
 | 
			
		||||
            CommandLineInterface::Simple(cli_cmd) => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user