Extract out history parts.

This commit is contained in:
Andrés N. Robalino
2020-08-27 06:06:25 -05:00
parent 4724b3c570
commit 26cec83b63
7 changed files with 56 additions and 44 deletions

View File

@ -1,4 +1,3 @@
use crate::cli::History;
use crate::prelude::*;
use nu_errors::ShellError;
use nu_protocol::{TaggedDictBuilder, UntaggedValue, Value};
@ -48,7 +47,7 @@ pub fn nu(env: &IndexMap<String, String>, tag: impl Into<Tag>) -> Result<Value,
UntaggedValue::path(keybinding_path).into_value(&tag),
);
let history = History::path();
let history = crate::commands::history::history_path(&nu_data::config::NuConfig::new());
nu_dict.insert_value(
"history-path",
UntaggedValue::path(history).into_value(&tag),