From 603c5b76e813935363b168418883ff0d505b6669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20H=C3=B8rl=C3=BCck=20Berg?= <36937807+henrikhorluck@users.noreply.github.com> Date: Fri, 18 Aug 2023 17:21:56 +0200 Subject: [PATCH] Remove C++ version of `start_private_mode` --- fish-rust/src/history.rs | 1 + src/history.cpp | 5 ----- src/history.h | 3 --- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/fish-rust/src/history.rs b/fish-rust/src/history.rs index 248433f36c94..49f84af68ce6 100644 --- a/fish-rust/src/history.rs +++ b/fish-rust/src/history.rs @@ -1,6 +1,7 @@ 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/src/history.cpp b/src/history.cpp index 931d614ca2ba..583968130576 100644 --- a/src/history.cpp +++ b/src/history.cpp @@ -1584,11 +1584,6 @@ std::shared_ptr history_t::with_name(const wcstring &name) { return hist; } -void start_private_mode(env_stack_t &vars) { - vars.set_one(L"fish_history", ENV_GLOBAL, L""); - vars.set_one(L"fish_private_mode", ENV_GLOBAL, L"1"); -} - bool in_private_mode(const environment_t &vars) { return vars.get_unless_empty(L"fish_private_mode").has_value(); } diff --git a/src/history.h b/src/history.h index 1d6d49d54b8b..fc029509b893 100644 --- a/src/history.h +++ b/src/history.h @@ -342,9 +342,6 @@ path_list_t expand_and_detect_paths(const path_list_t &paths, const environment_ */ bool all_paths_are_valid(const path_list_t &paths, const operation_context_t &ctx); -/** Sets private mode on. Once in private mode, it cannot be turned off. */ -void start_private_mode(env_stack_t &vars); - /** Queries private mode status. */ bool in_private_mode(const environment_t &vars);