summaryrefslogtreecommitdiffstats
path: root/src/shell
diff options
context:
space:
mode:
Diffstat (limited to 'src/shell')
-rw-r--r--src/shell/history/entry.rs2
-rw-r--r--src/shell/mod.rs4
-rw-r--r--src/shell/readline.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/shell/history/entry.rs b/src/shell/history/entry.rs
index 01aad8b..a45d99d 100644
--- a/src/shell/history/entry.rs
+++ b/src/shell/history/entry.rs
@@ -343,7 +343,7 @@ impl Entry {
env: Env,
event_w: async_std::channel::Sender<Event>,
) {
- self.state = State::Exited(ExitInfo::new(*env.latest_status()));
+ self.state = State::Exited(ExitInfo::new(env.latest_status()));
self.env = env;
event_w.send(Event::PtyClose).await.unwrap();
}
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();
diff --git a/src/shell/readline.rs b/src/shell/readline.rs
index ffe92fe..f0fb950 100644
--- a/src/shell/readline.rs
+++ b/src/shell/readline.rs
@@ -27,7 +27,7 @@ impl Readline {
focus: bool,
offset: time::UtcOffset,
) -> anyhow::Result<()> {
- let pwd = env.current_dir();
+ let pwd = env.pwd();
let user = crate::info::user()?;
let hostname = crate::info::hostname()?;
let time = crate::info::time(offset)?;