mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-28 04:13:44 +00:00
Allow zsh-newuser-install to run
Shell integration wont be turned on for an unconfigured zsh
This commit is contained in:
parent
5d491b8067
commit
0a9005f5ce
1 changed files with 6 additions and 0 deletions
|
|
@ -74,6 +74,12 @@ def setup_fish_env(env: Dict[str, str]) -> None:
|
|||
def setup_zsh_env(env: Dict[str, str]) -> None:
|
||||
zdotdir = os.environ.get('ZDOTDIR')
|
||||
base = zdotdir or os.path.expanduser('~')
|
||||
for q in ('.zshenv', '.zprofile', '.zshrc', '.zlogin'):
|
||||
if os.path.exists(os.path.join(base, q)):
|
||||
break
|
||||
else:
|
||||
# a new zsh install dont prevent zsh-newuser-install from running
|
||||
return
|
||||
if zdotdir is not None:
|
||||
env['KITTY_ORIG_ZDOTDIR'] = zdotdir
|
||||
env['KITTY_ZSH_BASE'] = base
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue