0

I have setup my (oh-my-zsh) terminal to display/indicate all sort of git stuff (on which branch, uncommited changes, etc.).

I believe that it comes from

plugins=(
  git
  ...
)

Is it also possible to have it indicate who you are pairing with?

I tend to forget to change the pairs once it a while and it would be a big help if it was there.

Hope this mockup shows what I'm looking for:

~/Desktop master ✔                                                                        
▶ git pair js sp
user.name=Josh Susser & Sam Pierson
user.email=pair+jsusser+sam@pivotallabs.com

~/Desktop master ✔ (js sp)                                                                        
▶ git commit .
0

Found a solution

.zshrc

[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh
source ~/powerlevel10k/powerlevel10k.zsh-theme

function prompt_git_user() {
    p10k segment -f 003 -i "$(git config user.name)"
  }

POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
  newline
  git_user
)

Just be aware that the example overrules your settings for the right side of the prompt (where things like command_execution_time lives)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.