TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
8.86k stars 697 forks source link

Support for `~` OR `$HOME` in config paths #428

Open gwpl opened 6 months ago

gwpl commented 6 months ago

I tried to define /etc/skel/.config/shell_gpt/.sgptrc in skeleton for new users , and encountered following problem, when I define paths using $HOME or ~:

CHAT_CACHE_PATH=~/.cache/shell_gpt/chat_cache
CACHE_PATH=~/.cache/shell_gpt/cache
ROLE_STORAGE_PATH=~/.config/shell_gpt/roles

or

CHAT_CACHE_PATH=$HOME/.cache/shell_gpt/chat_cache
CACHE_PATH=$HOME/.cache/shell_gpt/cache
ROLE_STORAGE_PATH=$HOME/.config/shell_gpt/roles

sgpt is treating $HOME and ~ literally.

gwpl commented 6 months ago

Support for ~ with os.path.expanduser(...) in https://github.com/TheR1D/shell_gpt/pull/429