From 465faca6d1255cb630de00e374a1675be25aa547 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Fri, 14 Jul 2023 20:58:20 +0100 Subject: Add workspace mode, enable if in git repo (#1053) * Add workspace mode, enable if in git repo * Fix tests * Should now be good * Page filter modes correctly if in workspace --- atuin-client/src/settings.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'atuin-client/src/settings.rs') diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs index bb41a890..3bcb2705 100644 --- a/atuin-client/src/settings.rs +++ b/atuin-client/src/settings.rs @@ -72,6 +72,9 @@ pub enum FilterMode { #[serde(rename = "directory")] Directory = 3, + + #[serde(rename = "workspace")] + Workspace = 4, } impl FilterMode { @@ -81,6 +84,7 @@ impl FilterMode { FilterMode::Host => "HOST", FilterMode::Session => "SESSION", FilterMode::Directory => "DIRECTORY", + FilterMode::Workspace => "WORKSPACE", } } } @@ -163,6 +167,7 @@ pub struct Settings { pub history_filter: RegexSet, #[serde(with = "serde_regex", default = "RegexSet::empty")] pub cwd_filter: RegexSet, + pub workspaces: bool, // This is automatically loaded when settings is created. Do not set in // config! Keep secrets and settings apart. @@ -374,6 +379,7 @@ impl Settings { .set_default("scroll_context_lines", 1)? .set_default("shell_up_key_binding", false)? .set_default("session_token", "")? + .set_default("workspaces", false)? .add_source( Environment::with_prefix("atuin") .prefix_separator("_") -- cgit v1.3.1