diff options
Diffstat (limited to 'src/run/mod.rs')
| -rw-r--r-- | src/run/mod.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/run/mod.rs b/src/run/mod.rs index 7e575ce..bae9567 100644 --- a/src/run/mod.rs +++ b/src/run/mod.rs @@ -463,6 +463,11 @@ impl parse::Expander for Executor { var: BString, default: Option<BString>, ) -> Result<BString, Self::Error> { + match &var[..] { + b"CWD_PRETTY" => return Ok(crate::pretty_cwd().into_bytes()), + _ => {} + } + if var.is_empty() { return Err(ExecError::UnknownVariable(var)); } @@ -610,7 +615,8 @@ pub fn run(se: Arc<Mutex<Session>>, parsed: Ast<PreExpansion>) { Err(e) => format!("{}\r\n", e.error_message()), }; - print!("\r{status_string}{}", se.lock().unwrap().prompt()); + print!("\r{status_string}"); + Session::reprint_prompt(se); let _ = std::io::stdout().lock().flush(); } } |
