forked from extern/nushell
Include history path in env command
This commit is contained in:
parent
112e5d096f
commit
9623a255c4
@ -212,7 +212,7 @@ fn load_plugins(context: &mut Context) -> Result<(), ShellError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
struct History;
|
||||
pub struct History;
|
||||
|
||||
impl History {
|
||||
pub fn path() -> PathBuf {
|
||||
|
@ -1,3 +1,4 @@
|
||||
use crate::cli::History;
|
||||
use crate::data::config;
|
||||
use crate::data::{Dictionary, Value};
|
||||
use crate::errors::ShellError;
|
||||
@ -45,6 +46,9 @@ pub fn get_environment(tag: Tag) -> Result<Tagged<Value>, Box<dyn std::error::Er
|
||||
let config = config::default_path()?;
|
||||
indexmap.insert("config".to_string(), Value::path(config).tagged(tag));
|
||||
|
||||
let history = History::path();
|
||||
indexmap.insert("history".to_string(), Value::path(history).tagged(tag));
|
||||
|
||||
let temp = std::env::temp_dir();
|
||||
indexmap.insert("temp".to_string(), Value::path(temp).tagged(tag));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user