diff options
author | Ellie Huxtable <ellie@elliehuxtable.com> | 2022-06-10 10:00:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 10:00:59 +0100 |
commit | 23b9d34e162a9cf27b519c1fe075785be25c46e5 (patch) | |
tree | 48eab6e38d829b5f4147eb36d7e45d436d85f1b6 /atuin-server/src/settings.rs | |
parent | e0ba60fc3c4d72d785a13eea5718b91559fd218d (diff) |
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
Diffstat (limited to 'atuin-server/src/settings.rs')
-rw-r--r-- | atuin-server/src/settings.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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("_") |