Skip to content

Conversation

@kmr-srbh
Copy link

@kmr-srbh kmr-srbh commented Sep 18, 2025

Resolves #237

Before

~/OpenSource/shell(main)$ 
~/OpenSource/shell(main)$ cd ./crates/
~/OpenSource/shell/crates(main)$ cd ..
~/OpenSource/shell(main)$ 

Now

~/shell(display-unix-style-cwd)$ 
~/shell(display-unix-style-cwd)$ cd ./crates/
~/crates(display-unix-style-cwd)$ cd ..
~/shell(display-unix-style-cwd)$ 

Changes

  • Updates the prompt string to the directory base name after the cd command.
  • Sets the terminal title to the directory base name after the cd command.

@kmr-srbh
Copy link
Author

kmr-srbh commented Sep 18, 2025

CC @certik, @wolfv

@kmr-srbh kmr-srbh changed the title enh: display home-relative directory paths on Unix based systems (~/dir) enh: display directory base name as path on Unix based systems (~/dir) Sep 18, 2025
@kmr-srbh kmr-srbh force-pushed the display-unix-style-cwd branch from b4b67cc to a660418 Compare September 18, 2025 21:08
@kmr-srbh kmr-srbh changed the title enh: display directory base name as path on Unix based systems (~/dir) enh: display directory base name as terminal title on Unix based systems (~/dir) Sep 18, 2025
@kmr-srbh kmr-srbh force-pushed the display-unix-style-cwd branch from a660418 to 143f127 Compare September 18, 2025 21:10
shell_options: HashMap<ShellOptions, bool>,
}

#[allow(clippy::print_stdout)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this function removed? I think it seems useful and I don't see us setting the title elsewhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only sets the PS1, right? Not the terminal title? Or am I missing something?

…ems (`~/dir`)

Signed-off-by: Saurabh Kumar <developer.saurabh@outlook.com>
@kmr-srbh kmr-srbh force-pushed the display-unix-style-cwd branch from f81a79f to e3a8414 Compare November 11, 2025 14:42
@kmr-srbh
Copy link
Author

kmr-srbh commented Nov 11, 2025

Hello @wolfv! Thanks for the review! :)

I was developing with the VS Code integrated terminal and misunderstood the prompt string to be the terminal title. I am new to terminal emulators and learning. I have pushed the new changes. Thank you very much for your guidance!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When showing the directory in the terminal tab, use ~

2 participants