add configuration of maximum history size (#563)

This commit is contained in:
Darren Schroeder
2021-12-23 13:59:00 -06:00
committed by GitHub
parent 5c83f4d405
commit ba1ff4cf6c
2 changed files with 10 additions and 2 deletions

View File

@ -364,8 +364,11 @@ fn main() -> Result<()> {
),
))
.with_history(Box::new(
FileBackedHistory::with_file(1000, history_path.clone())
.into_diagnostic()?,
FileBackedHistory::with_file(
config.max_history_size as usize,
history_path.clone(),
)
.into_diagnostic()?,
))
.into_diagnostic()?
} else {