diff --git a/fish-rust/src/history.rs b/fish-rust/src/history.rs new file mode 100644 index 000000000..49f84af68 --- /dev/null +++ b/fish-rust/src/history.rs @@ -0,0 +1,8 @@ +use crate::env::{EnvMode, EnvStack}; +use crate::wchar::prelude::*; + +/// Sets private mode on. Once in private mode, it cannot be turned off. +pub fn start_private_mode(vars: &EnvStack) { + vars.set_one(L!("fish_history"), EnvMode::GLOBAL, "".into()); + vars.set_one(L!("fish_private_mode"), EnvMode::GLOBAL, "1".into()); +} diff --git a/fish-rust/src/lib.rs b/fish-rust/src/lib.rs index 0c20913a2..f65ed25d9 100644 --- a/fish-rust/src/lib.rs +++ b/fish-rust/src/lib.rs @@ -41,6 +41,7 @@ mod future_feature_flags; mod global_safety; mod highlight; +mod history; mod io; mod job_group; mod kill;