history tweaks
This commit is contained in:
		@ -98,7 +98,7 @@ impl Command {
 | 
			
		||||
			history.add(self.0.as_str());
 | 
			
		||||
			child.wait().ok();
 | 
			
		||||
		} else {
 | 
			
		||||
			println!("Unknown command: {}", self.0)
 | 
			
		||||
			println!("lambdashell: Unknown command: {}", self.0)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -36,9 +36,8 @@ impl History {
 | 
			
		||||
				.open(history_file.as_path())
 | 
			
		||||
			.map_or_display(|mut file| {
 | 
			
		||||
				let newline_maybe = if fs_history.is_empty() { "" } else { "\n" };
 | 
			
		||||
				if let Err(write_err) = file.write_all(format!("{newline_maybe}{}", self.history.join("\n")).as_bytes()) {
 | 
			
		||||
					session::shell_error(write_err);
 | 
			
		||||
				};
 | 
			
		||||
				let formatted = format!("{newline_maybe}{}", self.history.join("\n"));
 | 
			
		||||
				file.write_all(formatted.as_bytes()).unwrap_or_else(session::shell_error)
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -41,7 +41,7 @@ pub trait ShellGlobal {
 | 
			
		||||
}
 | 
			
		||||
impl ShellGlobal for LuauVm {
 | 
			
		||||
	fn global_shell(&self, luau_globals: &Table) -> lResult<()> {
 | 
			
		||||
		luau_globals.set("SHELL", Shell(Rc::clone(&self.ps)))?;
 | 
			
		||||
		luau_globals.raw_set("SHELL", Shell(Rc::clone(&self.ps)))?;
 | 
			
		||||
		Ok(())
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user