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
Support changing color of the Git action part of the prompt #486
Conversation
@mafredri @sindresorhus Could you take a look please? Small PR to change the color of the "you are in the middle of a rebase" marker. |
Can you also add it to the ASCII diagram in https://github.com/sindresorhus/pure#colors? |
9350033
to
57bc013
Compare
57bc013
to
8b9c249
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, I think this is a great change and one I will likely use myself 😄.
preprompt_parts+=("%F{$git_color}"'${prompt_pure_vcs_info[branch]}${prompt_pure_git_dirty}%f') | ||
local branch="%F{$git_color}"'${prompt_pure_vcs_info[branch]}' | ||
if [[ -n $prompt_pure_vcs_info[action] ]]; then | ||
branch+="|%F{$prompt_pure_colors[git:action]}"'$prompt_pure_vcs_info[action]'"%F{$git_color}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've considered it good practice to end all %F
with %f
, but there are probably no real benefits there. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given it was used on the next line in a format that does end with %f
I didn't think it necessary here.
Nice work :) |
* upstream/master: Renice the async worker (sindresorhus#505) Add zstyle color support to PS2 (sindresorhus#481) Improve issue template and system reporting (sindresorhus#517) Guard against (ana)conda changing PS1 (sindresorhus#516) 1.11.0 Add coloring for git dirty-asterisk (sindresorhus#491) Support changing color of the Git action part of the prompt (sindresorhus#486) Use ellipsis for continuation prompt (PS2) (sindresorhus#493) Fix missing ─ in readme color diagram Fix extra space in color diagram of readme Simplify the setup phase in the readme (sindresorhus#494) Use box characters for prompt diagram in the readme (sindresorhus#495)
I do a lot of rebasing and cherry-picking and I like to know when I'm in that mode, so I added an option to make it stand out more.
A picture is worth a thousand words: