Is there a way to set the tab name or window title to the current directory or file you are in as you move around?
I see you can set tab names and window titles using remote, but is there a way to listen to changes for which directory or file you are in? Could this be added as a kitty config setting to be set automatically?
I like to work with several tabs open and now they all say bash. I guess i could set the tab name as i open them but then it would stick if i change the folder.
I'm on macOS, using kitty 12.1
You configure this in your shell https://stackoverflow.com/questions/10517128/change-gnome-terminal-title-to-reflect-the-current-directory
In zsh it's done via precmd () {print -Pn "\e]0;%~\a"} in .zshrc
In zsh it's done via
precmd () {print -Pn "\e]0;%~\a"}in .zshrc
I add your codes in my .zshrc but nothing's changed.
What may I missed?
Thank you.
What may I missed?
What may I missed?
- You use a terminal emulator other than kitty?
- You didn't restart it?
Thank for quick response.
source ~/.zshrc. May I do anything?Thank you again.
Try to close all instances of kitty and run it again. I have the exact same line in my .zshrc and it works perfectly.
UPD: also ensure that line is placed in the end of .zshrc
Most helpful comment
You configure this in your shell https://stackoverflow.com/questions/10517128/change-gnome-terminal-title-to-reflect-the-current-directory