Browse Source

feat: add add german flag style to blahaj

main
fdai7374 2 years ago
parent
commit
0ac7318e9c
  1. 17
      src/builtins/blahaj.rs

17
src/builtins/blahaj.rs

@ -2,6 +2,7 @@ use crate::builtins::{Builtin, BuiltinConfig};
use crate::error::ShellError;
use colored::Colorize;
pub struct Blahaj;
impl Builtin for Blahaj {
@ -33,6 +34,8 @@ impl Builtin for Blahaj {
trans_flag(blahaj);
} else if args[0].eq("-p") {
pride_flag(blahaj);
}else if args[0].eq("-ger"){
german(blahaj);
}
}
Ok(())
@ -68,4 +71,16 @@ fn pride_flag(blahaj: &str) {
}
index = index + 1;
}
}
}
fn german (blahaj: &str){
for (index,lines) in blahaj.lines().enumerate(){
if index<=7{
println!("{}",lines.truecolor(30,30,30));
}else if index>6&&index<=12 {
println!("{}",lines.truecolor(255,0,0));
}else { println!("{}", lines.truecolor(255,255,0)); }
}
}
Loading…
Cancel
Save