Open flip111 opened 7 years ago
I use oh-my-zsh too. Just follow the instructions in the readme by adding the script in the current theme
you're using. Generally the themes are stored at : ~/.oh-my-zsh/themes
, if you're using a custom theme, then it might be stored at ~/.oh-my-zsh/custom/themes
. For example, if you're using the agnoster
theme, simply add the script in ~/.oh-my-zsh/themes/agnoster.zsh-theme
, then look for PROMPT
in the theme and make sure the drink_water
function is called in it too.
I wonder if there's an easier way to do it perhaps using it as a plugin. I'll have to look at the docs.
Since the script makes changes in the PROMPT
, will it be possible for a plugin to append to the PROMPT
(which is essentially modified by the theme), rather than overriding the theme?
Possibly not. The way git prompt works in the themes basically assume git exists and call the git prompt function and add it to the prompt. Simply appending to the prompt won't work because it has to be called on every update and it needs to be in a specific place in the prompt. For example, my theme is two lines and the second line is an arrow. If it were just appended it would look weird. Perhaps using a custom theme is the best/only way to do it. I'll keep looking.
I'm using it with zsh but not oh-my-zsh, I'm using antigen and prompt pure- so naturally when adding thirsty.sh it overrides prompt pure. I'm going to see if I can rig it up to work as a zsh and/or antigen plugin of some kind. I'll open a pull req if successful
this looks nice, any idea how to integrate it with https://github.com/robbyrussell/oh-my-zsh ?