diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-01-16 22:50:22 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-01-16 22:50:22 -0500 |
commit | a537464a915aea2e38c62df041996b8525367bde (patch) | |
tree | 37f7a13167d1ea4f655c3a695c662abd0febe525 /src/shell/mod.rs | |
parent | b66e1f99c30625988ec489f278e449a840bb3754 (diff) | |
download | nbsh-a537464a915aea2e38c62df041996b8525367bde.tar.gz nbsh-a537464a915aea2e38c62df041996b8525367bde.zip |
move default environment variable setting to shell initialization
Diffstat (limited to 'src/shell/mod.rs')
-rw-r--r-- | src/shell/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shell/mod.rs b/src/shell/mod.rs index 0547bae..8343b0e 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -212,10 +212,13 @@ pub struct Shell { impl Shell { pub fn new(offset: time::UtcOffset) -> anyhow::Result<Self> { + let mut env = Env::new()?; + env.set_var("SHELL", std::env::current_exe()?); + env.set_var("TERM", "screen"); Ok(Self { readline: readline::Readline::new(), history: history::History::new(), - env: Env::new()?, + env, git: None, focus: Focus::Readline, scene: Scene::Readline, |