41 lines
1.8 KiB
Rust
41 lines
1.8 KiB
Rust
// use x86_64::registers::rflags::read;
|
|
|
|
use crate::{drivers::io::ascii::clear_screen, prelude::stdin::read_line, print, println};
|
|
|
|
static FETCH: &str = "
|
|
$$$$$$$$\\ $$\\
|
|
$$ _____| $$ |
|
|
$$ | $$$$$$\\ $$\\ $$\\ $$$$$$$\\ $$$$$$$ | $$$$$$\\ $$\\ $$\\
|
|
$$$$$\\ $$ __$$\\ $$ | $$ |$$ __$$\\ $$ __$$ |$$ __$$\\ $$ | $$ |
|
|
$$ __|$$ / $$ |$$ | $$ |$$ | $$ |$$ / $$ |$$ | \\__|$$ | $$ |
|
|
$$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ |
|
|
$$ | \\$$$$$$ |\\$$$$$$ |$$ | $$ |\\$$$$$$$ |$$ | \\$$$$$$$ |
|
|
\\__| \\______/ \\______/ \\__| \\__| \\_______|\\__| \\____$$ |
|
|
$$$$$$\\ $$$$$$\\ $$\\ $$\\ $$\\ $$\\ $$ |
|
|
$$ __$$\\ $$ __$$\\ $$ | $$ |$$$$ | \\$$$$$$ |
|
|
$$ / $$ |$$ / \\__| $$ | $$ |\\_$$ | \\______/
|
|
$$ | $$ |\\$$$$$$\\ \\$$\\ $$ | $$ |
|
|
$$ | $$ | \\____$$\\ \\$$\\$$ / $$ |
|
|
$$ | $$ |$$\\ $$ | \\$$$ / $$ |
|
|
$$$$$$ |\\$$$$$$ | \\$ / $$$$$$\\
|
|
\\______/ \\______/ \\_/ \\______|
|
|
";
|
|
|
|
pub async fn shell() {
|
|
println!("{}", FETCH);
|
|
|
|
loop {
|
|
print!(" Shell> ");
|
|
let line = read_line().await;
|
|
match line.as_str() {
|
|
"fetch" => {
|
|
println!("{}", FETCH);
|
|
}
|
|
"clear" => clear_screen(),
|
|
_ => {
|
|
println!("Unknown command: {}", line);
|
|
}
|
|
}
|
|
}
|
|
}
|