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
Change the agnoster theme for more configurability #3434
base: master
Are you sure you want to change the base?
Conversation
The agnoster theme now supports: * Setting color for all kinds of elements, by setting an appropiate config variable to the color name in your zshrc Example: AGNOSTER_GIT_DIRTY_BG=red # Set the git prompt background color to red for dirty repos * Allowing to separate the git root and the relative path in your prompt by setting AGNOSTER_GIT_INLINE to 'true' You will then have a segment for the git root (ie. ~/.oh-my-zsh) followed by the existing git branch segment (ie. master) and finally the relative directory path (ie. themes) * By setting AGNOSTER_STATUS_RETVAL_NUMERIC to 'true', The return value in the status prompt will become a number instead of a cross.
This works great for me! Any chance of it getting merged? |
I really hope it does, i did find a bug though which i'll fix in a bit. (I currently have not much time): Currently the Inline Git setting breaks inside bare repos. I will look into that when i have time. (Which should be within the next week) |
Wonderful changes! I'm definitely in support of this being merged. |
I have been using this for a few months without issue. |
Up until now the agnoster theme with enabled inline git branch display did not work properly for bare repos. This was caused by `git rev-parse --show-toplevel` returning empty string for bare repos. In that case it now uses the git directory as root. Your bare repo should be displayed properly (although you usually won't really navigate through a bare git repo, this is nice to have.
As promised, i fixed the issue with the inline git not working inside bare repos. |
For some reason i forgot to save the file in my editor, leading to the code not working. Luckily i looked through the changed files on github again and i found this. This is what happens if you don't care to actually test your code for once Due to some more lack of testing i totall missed that my earlier fix did not work. This is now really fixed. (i should not write code when tired.)
For some reason i forgot to save the file in my editor, leading to the code not working. Luckily i looked through the changed files on github again and i found this. This is what happens if you don't care to actually test your code for once Due to some more lack of testing i totall missed that my earlier fix did not work. This is now really fixed. (i should not write code when tired.)
Is there any chance of this ever getting merged? |
This is basically porting [this PR](ohmyzsh/ohmyzsh#3434) over to this repo. Would fix agnoster#30.
⌛️ Apologies for delays on this. With the number of changes and popularity of this theme (despite not using it myself), I would like to see this get rebased, again. I'll keep an eye out for that and hopefully we can get that merged quickly! |
Could we rebase this on top of master to review it properly? Thanks! |
any movements on this? |
Hi! If someone is interested on it, could you rebase it on top of master, and open a new PR? Thanks! |
The agnoster theme now supports:
AGNOSTER_GIT_DIRTY_BG=red # Set the git prompt background color to red for dirty repos
AGNOSTER_GIT_INLINE
totrue
. You will then have a segment for the git root (ie.~/.oh-my-zsh
) followed by the existing git branch segment (ie.master
) and finally the relative directory path (ie.themes
)AGNOSTER_STATUS_RETVAL_NUMERIC
totrue
, The return value in the status prompt will become a number instead of a cross.This will not affect people using this theme, as with default options, the theme behaves exactly as before this change.