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

Prompt just says "$(prompt_agnoster_main)" instead of looking cool #35

Open
Djaler opened this issue Apr 30, 2017 · 6 comments · May be fixed by #60
Open

Prompt just says "$(prompt_agnoster_main)" instead of looking cool #35

Djaler opened this issue Apr 30, 2017 · 6 comments · May be fixed by #60

Comments

@Djaler
Copy link

Djaler commented Apr 30, 2017

image

@Djaler Djaler changed the title Problem with zgen Problem with prompt Apr 30, 2017
@belak
Copy link
Contributor

belak commented May 1, 2017

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.

@Djaler
Copy link
Author

Djaler commented May 1, 2017

I just used
zgen load agnoster/agnoster-zsh-theme agnoster.zsh-theme

@belak
Copy link
Contributor

belak commented May 1, 2017

Ah, then adding something like https://github.com/sindresorhus/pure/blob/4cdd0cf/pure.zsh#L434 to agnoster may be a better fix

@paxet
Copy link

paxet commented Nov 24, 2017

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: #60

@apjanke
Copy link
Collaborator

apjanke commented Jan 3, 2020

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.)

@apjanke apjanke changed the title Problem with prompt Prompt just says "$(prompt_agnoster_main)" instead of looking cool Jan 3, 2020
@apjanke
Copy link
Collaborator

apjanke commented Jan 3, 2020

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?

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