Last active
February 1, 2019 07:17
-
-
Save Kasahs/bf63cf07c45a9f6979a97a1c43201577 to your computer and use it in GitHub Desktop.
A modified version of zsh theme "bira" to make copying branch names easier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
if [[ $UID -eq 0 ]]; then | |
local user_host='%{$terminfo[bold]$fg[red]%}%n%{$reset_color%}' | |
local user_symbol='#' | |
else | |
local user_host='%{$terminfo[bold]$fg[green]%}%n%{$reset_color%}' | |
local user_symbol='$' | |
fi | |
local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}' | |
local git_branch='$(git_prompt_info)%{$reset_color%}' | |
PROMPT="╭─${user_host} ${current_dir} ${git_branch} | |
╰─%B${user_symbol}%b " | |
RPS1="%B${return_code}%b" | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment