Created
February 3, 2023 10:37
-
-
Save joelbiffin/6efba8a1b2601496f4d7af434d132dd9 to your computer and use it in GitHub Desktop.
Stock zshrc file for new mac setups
This file contains hidden or 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
print-directory() { | |
echo "" | |
} | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export TERM="xterm-256color" CLICOLOR=1 | |
export LESS_TERMCAP_mb=$(print -P "%F{cyan}") \ | |
LESS_TERMCAP_md=$(print -P "%B%F{red}") \ | |
LESS_TERMCAP_me=$(print -P "%f%b") \ | |
LESS_TERMCAP_so=$(print -P "%K{magenta}") \ | |
LESS_TERMCAP_se=$(print -P "%K{black}") \ | |
LESS_TERMCAP_us=$(print -P "%U%F{green}") \ | |
LESS_TERMCAP_ue=$(print -P "%f%u") | |
export LESS_TERMCAP_mb=$(printf "\e[1;31m") # blink | |
export LESS_TERMCAP_md=$(printf "\e[1;31m") # bold | |
export LESS_TERMCAP_me=$(printf "\e[0m") # end bold, blink and underline | |
export LESS_TERMCAP_so=$(printf "\e[1;44;33m") # standout (reverse video) | |
export LESS_TERMCAP_se=$(printf "\e[0m") # end standout | |
export LESS_TERMCAP_us=$(printf "\e[1;32m") # underline | |
export LESS_TERMCAP_ue=$(printf "\e[0m") # end underline | |
export GREP_OPTIONS='--color=always' | |
alias firefox='open -a firefox' | |
branch() { | |
echo $(parse_git_branch | sed 's/.*(\(.*\))/\1/') | |
} | |
setopt PROMPT_SUBST | |
NEWLINE=$'\n' | |
PROMPT='${NEWLINE}%{%F{magenta}%}%1d%{%F{green}%}$(parse_git_branch)%{%F{none}%}${NEWLINE} $ ' | |
export CLICOLOR=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment