Implemented scoping for expansions

This commit is contained in:
2025-03-08 01:38:42 -05:00
parent 67977f96eb
commit cdcfb23edb
18 changed files with 271 additions and 141 deletions

View File

@@ -1,4 +1,6 @@
use std::fmt::Display;
use std::{fmt::Display, os::fd::AsRawFd};
use nix::sys::termios;
use crate::prelude::*;
@@ -46,6 +48,9 @@ pub fn sh_quit(code: i32) -> ! {
job.killpg(Signal::SIGTERM).ok();
}
});
if let Some(termios) = crate::get_saved_termios() {
termios::tcsetattr(std::io::stdin(), termios::SetArg::TCSANOW, &termios).unwrap();
}
exit(code);
}