Variables for cache paths? #123
-
I'd like to use environment variable to define the cache directory paths. Setting the config options in .sgptrc works however the paths are static and so I can't share a conversation cache between two accounts on my mac (by setting the cache path to a shared Google Drive volume). Unfortunately the path to the shared drive is different for each user account.
Thanks, sgpt is awesome! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Thank you for the feedback! It is possible to use environment variables for any parameters defined in the rc file. You can use the same names. For instance, you can define: export CHAT_CACHE_PATH=/path/to/cache ShellGPT prioritizes ENV variables. In this case, no matter where CHAT_CACHE_PATH in the rc file points, the one from ENV will be used. |
Beta Was this translation helpful? Give feedback.
-
@TheR1D I put this in sgptrc
With this in zshrc
but it doesn't use env var instead creates literally ~/"$SHELL_GPT_CACHE/ dir |
Beta Was this translation helpful? Give feedback.
Thank you for the feedback! It is possible to use environment variables for any parameters defined in the rc file. You can use the same names. For instance, you can define:
export CHAT_CACHE_PATH=/path/to/cache
ShellGPT prioritizes ENV variables. In this case, no matter where CHAT_CACHE_PATH in the rc file points, the one from ENV will be used.