Last active
March 30, 2023 15:58
-
-
Save dfelton/f8d0bd1ad09ec37877a0ff7d2b92758d to your computer and use it in GitHub Desktop.
Z Shell profile for maxOS
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
# Terminal Styling | |
setopt prompt_subst | |
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' stagedstr 'M' | |
zstyle ':vcs_info:*' unstagedstr 'M' | |
zstyle ':vcs_info:*' check-for-changes true | |
zstyle ':vcs_info:*' actionformats '%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' | |
zstyle ':vcs_info:*' formats \ | |
'%F{5}[%F{2}%b%F{5}] %F{2}%c%F{3}%u%f' | |
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked | |
zstyle ':vcs_info:*' enable git | |
+vi-git-untracked() { | |
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \ | |
[[ $(git ls-files --other --directory --exclude-standard | sed q | wc -l | tr -d ' ') == 1 ]]; | |
then | |
hook_com[unstaged]+='%F{1}??%f' | |
fi | |
} | |
precmd () { vcs_info } | |
PROMPT='%F{5}[%F{2}%n%F{5}] %F{3}%3~ ${vcs_info_msg_0_} %f%# ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment