Port history::start_private_mode to Rust

This commit is contained in:
Henrik Hørlück Berg
2023-08-18 07:01:04 +02:00
committed by Fabian Boehm
parent c5c5043d7e
commit 3777bc941f
2 changed files with 9 additions and 0 deletions

8
fish-rust/src/history.rs Normal file
View File

@@ -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());
}

View File

@@ -41,6 +41,7 @@
mod future_feature_flags;
mod global_safety;
mod highlight;
mod history;
mod io;
mod job_group;
mod kill;