|
|
@ -20,17 +20,16 @@ impl Builtin for Help { |
|
|
|
";
|
|
|
|
|
|
|
|
for line in commands.lines() {
|
|
|
|
println!("{}{}", split_command(line)[0].bold(),split_command(line)[1]);
|
|
|
|
println!("{}{}", split_command(line)[0].bold(), split_command(line)[1]);
|
|
|
|
}
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn split_command(commands: &str) -> Vec<&str> {
|
|
|
|
let mut splitted_command: Vec<&str> = vec![];
|
|
|
|
if !commands.is_empty() && commands.trim().len() >=1 {
|
|
|
|
splitted_command = commands.trim_start().splitn(2, " ").collect();
|
|
|
|
return splitted_command
|
|
|
|
if !commands.is_empty() && commands.trim().len() >= 1 {
|
|
|
|
let splitted_command = commands.trim_start().splitn(2, " ").collect();
|
|
|
|
return splitted_command;
|
|
|
|
}
|
|
|
|
return vec!["",""];
|
|
|
|
return vec!["", ""];
|
|
|
|
}
|