0xacx / chatGPT-shell-cli

Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required.
https://gptshell.cc
MIT License
1.05k stars 151 forks source link

Add .zshrc to install script, since it was missing. #63

Closed emirkmo closed 1 year ago

emirkmo commented 1 year ago

Add check for .zshrc after .zprofile to enable installing on a wider linux platform base. Also Make it so that $PATH is not modified if usr/local/bin already exists on path in .zshrc. (Added a new PR to make this default on other install methods as well).

Problem:

The install script fails if there is only .zshrc but no .zprofile. This is a common setup as .zshrc is actually the place to declare packages etc. for use in any interactive shell and .zprofile is supposed to be only for login shells: See unix.stackexchange discussion.

0xacx commented 1 year ago

Thank you for your PR and concern on interactive login shells. I understand the differences between zprofile and zshrc in theory but in practice, since zprofile is sourced before zshrc, any variables should already be accessible. I wouldn't like to add another file for zsh, as that would increase complexity unnecessarily but after reading the issue where you said that zprofile does not exist in debian, I decided to merge this PR.