From 23b9d34e162a9cf27b519c1fe075785be25c46e5 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Fri, 10 Jun 2022 10:00:59 +0100 Subject: Add configurable history length (#447) * Add configurable history length This allows servers to decide the max length of each history item they want to store! Some users might have much larger history lines than others. This setting can be set to 0 to allow for unlimited history length. This is not recommended for a public server install, but for a private one it can work nicely. * Format lol --- atuin-server/src/settings.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'atuin-server/src/settings.rs') diff --git a/atuin-server/src/settings.rs b/atuin-server/src/settings.rs index e6745173..b0e07b71 100644 --- a/atuin-server/src/settings.rs +++ b/atuin-server/src/settings.rs @@ -13,6 +13,7 @@ pub struct Settings { pub port: u16, pub db_uri: String, pub open_registration: bool, + pub max_history_length: usize, } impl Settings { @@ -33,6 +34,7 @@ impl Settings { .set_default("host", "127.0.0.1")? .set_default("port", 8888)? .set_default("open_registration", false)? + .set_default("max_history_length", 8192)? .add_source( Environment::with_prefix("atuin") .prefix_separator("_") -- cgit v1.3.1