Open Djaler opened 7 years ago
How are you initializing the prompt? If you use prompt agnoster
this should work just fine. If you're calling prompt_agnoster_setup
directly it may not work. The problem lies with the prompt_subst option, which should always be set. Using prompt agnoster
uses a little wrapper function to grab the prompt_opts which are set in the setup function... calling the setup function directly may cause those options to be ignored.
I just used
zgen load agnoster/agnoster-zsh-theme agnoster.zsh-theme
Ah, then adding something like https://github.com/sindresorhus/pure/blob/4cdd0cf/pure.zsh#L434 to agnoster may be a better fix
I'm migrating to zgen from OMZ and want to use agnoster theme too. But without loading oh-my-zsh system.
Loading agnoster like Djaler said:
zgen load agnoster/agnoster-zsh-theme agnoster.zsh-theme
Can confirm that including the referenced line by belak solves the problem.
Landed a Pull Request: https://github.com/agnoster/agnoster-zsh-theme/pull/60
Yep. You need to setopt promptsubst
in your zsh configuration. If you're running Agnoster inside Oh My Zsh (which it seems primarily designed for), Oh My Zsh will do that for you. If you're running Agnoster on its own, you must do this manually.
As a workaround until one of these PRs lands, just stick an unconditional setopt promptsubst
in your ~/.zshrc
file, and Agnoster will work everywhere. (You highly likely want this turned on everywhere.)
See @qoomon's PR #114 for an alternate simple fix. Let's decide which approach is better. Or maybe it should just do a simple setopt promptsubst
to keep our option-setting to a minumum?