wow it's actually a shell now

parse-tree
Jordan Orelli 2 years ago
parent e2455594f4
commit d2066e8526

@ -14,13 +14,24 @@ impl Prompt {
}
pub fn print(&self) -> Result<()> {
unsafe {
match std::env::current_dir() {
Ok(d) => unsafe {
let text = d.to_str().unwrap().to_owned() + " " + &self.s;
Error::check(Console::WriteConsoleA(
stdout_handle()?,
text.as_bytes(),
None,
None,
))?;
}
Err(_) => unsafe {
Error::check(Console::WriteConsoleA(
stdout_handle()?,
self.s.as_bytes(),
None,
None,
))?;
},
}
Ok(())
}

Loading…
Cancel
Save