Change the order of file checks since .zshrc is most likely to exist

This commit is contained in:
Kovid Goyal 2021-11-27 10:27:51 +05:30
parent 0a9005f5ce
commit 5bc2fa187c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -74,7 +74,7 @@ def setup_fish_env(env: Dict[str, str]) -> None:
def setup_zsh_env(env: Dict[str, str]) -> None: def setup_zsh_env(env: Dict[str, str]) -> None:
zdotdir = os.environ.get('ZDOTDIR') zdotdir = os.environ.get('ZDOTDIR')
base = zdotdir or os.path.expanduser('~') base = zdotdir or os.path.expanduser('~')
for q in ('.zshenv', '.zprofile', '.zshrc', '.zlogin'): for q in ('.zshrc', '.zshenv', '.zprofile', '.zlogin'):
if os.path.exists(os.path.join(base, q)): if os.path.exists(os.path.join(base, q)):
break break
else: else: