mirror of
https://github.com/nushell/nushell.git
synced 2025-04-29 07:34:28 +02:00
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
struct History;
|
pub struct History;
|
||||||
|
|
||||||
impl History {
|
impl History {
|
||||||
pub fn path() -> PathBuf {
|
pub fn path() -> PathBuf {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::cli::History;
|
||||||
use crate::data::config;
|
use crate::data::config;
|
||||||
use crate::data::{Dictionary, Value};
|
use crate::data::{Dictionary, Value};
|
||||||
use crate::errors::ShellError;
|
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()?;
|
let config = config::default_path()?;
|
||||||
indexmap.insert("config".to_string(), Value::path(config).tagged(tag));
|
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();
|
let temp = std::env::temp_dir();
|
||||||
indexmap.insert("temp".to_string(), Value::path(temp).tagged(tag));
|
indexmap.insert("temp".to_string(), Value::path(temp).tagged(tag));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user