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

Display git user name #492

Closed
Norfeldt opened this issue Aug 16, 2019 · 1 comment
Closed

Display git user name #492

Norfeldt opened this issue Aug 16, 2019 · 1 comment

Comments

@Norfeldt
Copy link

Norfeldt commented Aug 16, 2019

This theme is beautiful!

I just started doing some pair coding and found find it very useful if I could have/hack it to show the user name in the .gitconfig.

Is this possible?

@mafredri
Copy link
Collaborator

mafredri commented Apr 13, 2020

Sorry, this feel through the cracks. I wonder if you ever managed to hack this in? If we ever get #460 implemented, this should be possible to do fairly cleanly. For the moment being though, you could add the following line:

	info[user]=$(git config --local --get user.email)

here:

pure/pure.zsh

Lines 273 to 274 in 7f1e473

info[action]=$vcs_info_msg_2_

And then modify prompt_pure_preprompt_render to add it to preprompt_parts.

Alternatively, you could utilize the right prompt (RPROMPT) to display it independent of Pure.

RPROMPT='$(git config --local --get user.email 2>/dev/null)'

@mafredri mafredri closed this as completed Jun 5, 2022
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

2 participants