diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2025-07-30 20:14:56 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2025-07-30 20:14:56 +0200 |
commit | 5a4f8de935872076e71c124de599ff88026e550d (patch) | |
tree | e49fe064cdeaf966a196ccf2b652f87f57e05f88 | |
parent | 2ebe8c10922c440b803016eaca3ea2dc209a7209 (diff) |
Add a space charater after the prompt.
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index c7dd48e..408a69b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,7 +22,8 @@ fn main() -> Result<()> { loop { let cwd = std::env::current_dir()?; let full_cwd = format_path(&cwd); - let interpolated_prompt = prompt_spec.replace("$p", &full_cwd).replace("$g", ">"); + let mut interpolated_prompt = prompt_spec.replace("$p", &full_cwd).replace("$g", ">"); + interpolated_prompt.push_str(" "); let line = match line_editor.readline(&interpolated_prompt) { Ok(line) => line, |