kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.12k stars 971 forks source link

Opening a directory with 'nvim' in a new tab adds 'nvim' as tab title name? #6726

Closed idelice closed 11 months ago

idelice commented 11 months ago

Describe the bug I'm experiencing kitty makes the title of a new tab to 'nvim' when opening a directory with 'nvim' command.

I EXPECT that the tab title name should be the directory of where I execute 'nvim' e.g. if it's projects/someProject the title should be someProject

To Reproduce Steps to reproduce the behavior:

  1. have two tabs open
  2. navigate to a directory/project in one of the tabs
  3. execute 'nvim'
  4. look at the tab name

Screenshots

Screenshot 2023-10-17 at 14 14 59

Environment details

kitty 0.30.1 (6a3529b7c2) created by Kovid Goyal
Darwin ibrahims-MBP.lan 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6020 arm64
ProductName:        macOS ProductVersion:       13.6 BuildVersion:      22G120
Frozen: True
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /bin/zsh
Loaded config files:
  /Users/ibrahimdelice/.config/kitty/kitty.conf

Config options different from defaults:
background_blur         60
background_opacity      0.8
editor                  /opt/homebrew/bin/nvim
font_size               13.0
hide_window_decorations 2
modify_font:
    cell_height 140%
tab_bar_edge            1
tab_bar_style           powerline
tab_title_template      {index}: {title[title.rfind('/')+1:]}

Important environment variables seen by the kitty process:
    PATH                                /Applications/kitty.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin
    LANG                                en_US.UTF-8
    SHELL                               /bin/zsh
    USER                                ibrahimdelice

Additional context Another "issue" is that when opening a new tab where you are in HOME, the tab title name has the full PC name which is kinda weird. How do fix that so it should only show the home symbol?

Screenshot 2023-10-17 at 14 20 00
kovidgoyal commented 11 months ago

That's by design read the kitty shell integrations docs.

idelice commented 11 months ago

That's by design read the kitty shell integrations docs.

I did and did the following changes. to kitty config: shell-integration no-title

and added following to .zshrc: precmd () {print -Pn "\e]0;%~\a"}

And I still can't get the name of the project dir to the title tab. It's always 'nvim'.

kovidgoyal commented 11 months ago

Then that will be because nvim is setting the title. Configure it not to.