kovidgoyal / kitty

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

Kitty seems not read my .zshrc file and don't import the path. #7246

Closed sbkkalex closed 7 months ago

sbkkalex commented 7 months ago

Describe the bug I set the config as follow,

shell .
editor nvim

And when I got into kitty preferences, it told me that it can't find nvim.

shell /bin/zsh --login --interactive
editor nvim

This one still not work.

shell /bin/zsh --login --interactive
editor /opt/homebrew/bin/nvim

This one finally worked, but inside nvim there are errors alert some software is not installed (which I did).

Screenshots

image image

Environment details

kitty 0.33.1 (a5fea33757) created by Kovid Goyal
Darwin liux101 22.6.0 Darwin Kernel Version 22.6.0: Mon Feb 19 19:43:15 PST 2024; root:xnu-8796.141.3.704.6~1/RELEASE_ARM64_T8112 arm64
ProductName:        macOS ProductVersion:       13.6.5 BuildVersion:        22G621
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/liux101/.config/kitty/kitty.conf

Config options different from defaults:
editor                  /opt/homebrew/bin/nvim
font_family             MesloLGS NF
font_size               18.0
shell                   /bin/zsh --login --interactive
Removed shortcuts:
    cmd+, →  edit_config_file
    cmd+enter →  new_window
    cmd+h →  hide_macos_app
    cmd+k →  clear_terminal to_cursor active
    cmd+m →  minimize_macos_window
    cmd+n →  new_os_window
    cmd+q →  quit
    cmd+t →  new_tab
    cmd+w →  close_tab
    ctrl+cmd+, →  load_config_file
    ctrl+cmd+f →  toggle_fullscreen
    opt+cmd+h →  hide_macos_other_apps
    opt+cmd+r →  clear_terminal reset active
    opt+cmd+s →  toggle_macos_secure_keyboard_entry
    shift+cmd+/ →  open_url https://sw.kovidgoyal.net/kitty/
    shift+cmd+[ →  previous_tab
    shift+cmd+] →  next_tab
    shift+cmd+d →  close_window
    shift+cmd+w →  close_os_window
Colors:
    active_border_color     #fbfcfc   
    active_tab_background   #565575   
    active_tab_foreground   #95ffa4   
    background              #1e1c31   
    color0                  #565575   
    color1                  #ff8080   
    color10                 #62d196   
    color11                 #ffb378   
    color12                 #65b2ff   
    color13                 #906cff   
    color14                 #63f2f1   
    color15                 #a6b3cc   
    color2                  #95ffa4   
    color3                  #ffe9aa   
    color4                  #91ddff   
    color5                  #c991e1   
    color6                  #aaffe4   
    color7                  #cbe3e7   
    color8                  #100e23   
    color9                  #ff5458   
    foreground              #cbe3e7   
    inactive_tab_background #565575   
    inactive_tab_foreground #cbe3e7   
    selection_background    #aaffe4   
    selection_foreground    #1e1c31   

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

On older versions of kitty, run kitty --debug-config instead
kovidgoyal commented 7 months ago

https://sw.kovidgoyal.net/kitty/faq/#things-behave-differently-when-running-kitty-from-system-launcher-vs-from-another-terminal

jiz4oh commented 5 months ago

Hi @kovidgoyal, according to the You need to make sure that the environment variables you define in your shell’s rc files are either also defined system wide or via the env directive in kitty.conf. could you mind provide a better way e.g. env_file that can set multiple env in a file? so at least I can manually save the ENV before I quit kitty and read it next time.

kovidgoyal commented 5 months ago

You can set multiple env vrs in kitty.conf via the env directive.

jiz4oh commented 5 months ago

@kovidgoyal I know, it's inconvenient to maintain and update many envs in kitty.conf. I have to delete all env sections in kitty.conf first and second add new env sections if I want to update env automaticlly. and the kitty.conf is added to my dotfiles, I don't think there is a good reason to set the same env section across all my computers

kovidgoyal commented 5 months ago

So use

include env.conf

in kitty.conf.

jiz4oh commented 5 months ago

ok, it's make sense, thank you @kovidgoyal