aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src/settings.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2023-07-14 20:58:20 +0100
committerGitHub <noreply@github.com>2023-07-14 19:58:20 +0000
commit465faca6d1255cb630de00e374a1675be25aa547 (patch)
treee8977ac6c11fadceb2a7140bafd42bafca353c37 /atuin-client/src/settings.rs
parentDelete the count cache row when a user is deleted (#1103) (diff)
downloadatuin-465faca6d1255cb630de00e374a1675be25aa547.zip
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
Diffstat (limited to 'atuin-client/src/settings.rs')
-rw-r--r--atuin-client/src/settings.rs6
1 files changed, 6 insertions, 0 deletions
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("_")