We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a326de3 commit 937b926Copy full SHA for 937b926
codex-rs/tui/src/tui.rs
@@ -1,6 +1,7 @@
1
use std::io::Result;
2
use std::io::Stdout;
3
use std::io::stdout;
4
+use std::env;
5
6
use codex_core::config::Config;
7
use crossterm::cursor::MoveTo;
@@ -44,9 +45,15 @@ pub fn init(_config: &Config) -> Result<Tui> {
44
45
set_panic_hook();
46
47
// Set terminal title and clear screen and move cursor to top-left before drawing UI
48
+ let current_dir = env::current_dir()
49
+ .ok()
50
+ .and_then(|path| path.file_name().map(|name| name.to_string_lossy().into_owned()))
51
+ .unwrap_or_else(|| "Unknown".to_string());
52
+ let title = format!("Codex CLI | {}", current_dir);
53
+
54
execute!(
55
stdout(),
- SetTitle("Codex CLI"),
56
+ SetTitle(&title),
57
Clear(ClearType::All),
58
MoveTo(0, 0)
59
)?;
0 commit comments