mirror of
https://github.com/nushell/nushell
synced 2024-12-26 04:53:09 +00:00
Include history path in env command
This commit is contained in:
parent
112e5d096f
commit
9623a255c4
2 changed files with 5 additions and 1 deletions
|
@ -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 a new issue