Browse Source

feat: add trans flag style for blahaj

main
fdai7374 2 years ago
committed by fdai7451
parent
commit
e7aa9e0f5a
  1. 24
      src/builtins/blahaj.rs

24
src/builtins/blahaj.rs

@ -1,11 +1,12 @@
use crate::builtins::{Builtin, BuiltinConfig}; use crate::builtins::{Builtin, BuiltinConfig};
use crate::error::ShellError; use crate::error::ShellError;
use colored::Colorize;
pub struct Blahaj; pub struct Blahaj;
impl Builtin for Blahaj { impl Builtin for Blahaj {
fn execute(&mut self, _: &mut BuiltinConfig, _: Vec<String>) -> Result<(), ShellError> {
println!("
fn execute(&mut self, _: &mut BuiltinConfig, args: Vec<String>) -> Result<(), ShellError> {
let shonk="
((/ ((/
,(((/ ,(((/
/((((( (/ /((((( (/
@ -23,7 +24,24 @@ impl Builtin for Blahaj {
.. ....,..........,..*#%#######/( .. ....,..........,..*#%#######/(
.. .............,*%%%%#%((((/ .. .............,*%%%%#%((((/
**,,,****//*(##((###(#((( **,,,****//*(##((###(#(((
&#(#/#((((((((#");
&#(#/#((((((((#";
if args.is_empty() {
println!("{}",shonk);
}else {
if args[0].eq("-t") {
trans_flag(shonk);
}
}
Ok(()) Ok(())
} }
} }
fn trans_flag(shonk: &str){
for (index, lines) in shonk.lines().enumerate() {
if index%4==0 {
println!("{}",lines.truecolor(91,206,250));
}else if index%2==0 {
println!("{}", lines.white());
}else { println!("{}", lines.truecolor(245,169,184));}
}
}
Loading…
Cancel
Save