Skip to content

Commit

Permalink
Remove C++ version of start_private_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikhorluck committed Aug 18, 2023
1 parent 35888e8 commit 603c5b7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions 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());
Expand Down
5 changes: 0 additions & 5 deletions src/history.cpp
Expand Up @@ -1584,11 +1584,6 @@ std::shared_ptr<history_t> 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();
}
3 changes: 0 additions & 3 deletions src/history.h
Expand Up @@ -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);

Expand Down

0 comments on commit 603c5b7

Please sign in to comment.