Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot switch theme by if: tag #554

Open
SleepyBag opened this issue Aug 5, 2020 · 0 comments
Open

Cannot switch theme by if: tag #554

SleepyBag opened this issue Aug 5, 2020 · 0 comments

Comments

@SleepyBag
Copy link

SleepyBag commented Aug 5, 2020

I want to use the following lines to swtich between two themes on different terminal emulators.

zplug "robbyrussell/oh-my-zsh", use:themes/ys.zsh-theme, as:theme, if:'[[ "$foobar" == bad ]]'
zplug "sindresorhus/pure", from:github, use:pure.zsh, as:theme, if:'[[ "$foobar" == good ]]'

But I got a weird behavior:
Whatever the foobar variable is, the zsh starts with the same theme. The theme depends on the environment I run zsh for the first time after I modify the .zplug_loadfile.
That is, when I change my zplug configuration file, and restart zsh, and if at this time, foobar == bad, the theme will be ys. This is of no problem. But then, whenever when I open a new zsh, and with foobar == good, the theme will still be ys. And it will never change again.

Is there something wrong with my concept? I've searched through all the documentations about if tag, but found nothing about this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant