forked from extern/nushell
shows location of sqlite3 history file (#5784)
* shows location of sqlite3 file * fmt
This commit is contained in:
parent
d1c719a8cc
commit
ff73623873
@ -3,8 +3,8 @@ use nu_path::expand_path_with;
|
||||
use nu_protocol::{
|
||||
ast::{Block, Call, Expr, Expression, Operator},
|
||||
engine::{EngineState, Stack, Visibility},
|
||||
IntoInterruptiblePipelineData, IntoPipelineData, PipelineData, Range, ShellError, Span,
|
||||
Spanned, SyntaxShape, Unit, Value, VarId, ENV_VARIABLE_ID,
|
||||
HistoryFileFormat, IntoInterruptiblePipelineData, IntoPipelineData, PipelineData, Range,
|
||||
ShellError, Span, Spanned, SyntaxShape, Unit, Value, VarId, ENV_VARIABLE_ID,
|
||||
};
|
||||
use nu_utils::stdout_write_all_and_flush;
|
||||
use std::cmp::Ordering;
|
||||
@ -1238,7 +1238,14 @@ pub fn eval_variable(
|
||||
|
||||
let mut history_path = config_path.clone();
|
||||
|
||||
history_path.push("history.txt");
|
||||
match engine_state.config.history_file_format {
|
||||
HistoryFileFormat::Sqlite => {
|
||||
history_path.push("history.sqlite3");
|
||||
}
|
||||
HistoryFileFormat::PlainText => {
|
||||
history_path.push("history.txt");
|
||||
}
|
||||
}
|
||||
// let mut history_path = config_files::get_history_path(); // todo: this should use the get_history_path method but idk where to put that function
|
||||
|
||||
output_cols.push("history-path".into());
|
||||
|
Loading…
Reference in New Issue
Block a user