diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-01-17 00:05:00 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-01-17 00:05:00 -0500 |
commit | e7d8a9f7d234cb2b8a6691c5a2e33f2b18776a3d (patch) | |
tree | 84eac0ddc63e529275f48071adfdfefd1cdc1c0a /src/shell/mod.rs | |
parent | a537464a915aea2e38c62df041996b8525367bde (diff) | |
download | nbsh-e7d8a9f7d234cb2b8a6691c5a2e33f2b18776a3d.tar.gz nbsh-e7d8a9f7d234cb2b8a6691c5a2e33f2b18776a3d.zip |
simplify environment handling
this temporarily breaks cd history, will fix this soon
Diffstat (limited to 'src/shell/mod.rs')
-rw-r--r-- | src/shell/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell/mod.rs b/src/shell/mod.rs index 8343b0e..f7080a4 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -147,11 +147,11 @@ pub async fn main() -> anyhow::Result<i32> { } let mut shell = Shell::new(crate::info::get_offset())?; - let mut prev_dir = shell.env.current_dir().to_path_buf(); + let mut prev_dir = shell.env.pwd().to_path_buf(); git_w.send(prev_dir.clone()).await.unwrap(); let event_reader = event::Reader::new(event_r); while let Some(event) = event_reader.recv().await { - let dir = shell.env().current_dir(); + let dir = shell.env().pwd(); if dir != prev_dir { prev_dir = dir.to_path_buf(); git_w.send(dir.to_path_buf()).await.unwrap(); |