From: Gabriel Dunne Date: Wed, 6 Apr 2022 17:14:31 +0000 (-0700) Subject: Adding git to OSX prompt X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=030aac759aa975824b210746e68c2b3dcbedc462;p=cfg.git Adding git to OSX prompt --- diff --git a/.zsh-darwin b/.zsh-darwin index 22ad1d4..8bddbf3 100644 --- a/.zsh-darwin +++ b/.zsh-darwin @@ -1,8 +1,17 @@ +#!/bin/sh +# git +autoload -Uz vcs_info +precmd_vcs_info() { vcs_info } +precmd_functions+=( precmd_vcs_info ) +setopt prompt_subst +# RPROMPT='${vcs_info_msg_0_}' +# PROMPT='${vcs_info_msg_0_}%# ' +zstyle ':vcs_info:git:*' formats '%b' # prompt # time: %F{magenta}%* PROMPT='%F{cyan}%n@%m%f %F{240}%1~ %f%# ' -RPROMPT='%F{240}%*%f' +RPROMPT='%F{green}${vcs_info_msg_0_} %F{240}%*%f' # aliases alias cfg='/usr/bin/git --git-dir=/Users/gld/.cfg/ --work-tree=/Users/gld' diff --git a/.zshrc b/.zshrc index f23c5e0..ffba2fb 100644 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,5 @@ if [[ "$OSTYPE" == "darwin"* ]]; then - + # if OSX if [[ -e ~/.zsh-darwin ]]; then source ~/.zsh-darwin