chore: Move stuff around
This commit is contained in:
parent
1c1e7d5ec9
commit
cad39c59dd
1 changed files with 12 additions and 6 deletions
|
@ -4,13 +4,19 @@ autoload -Uz vcs_info
|
|||
precmd_vcs_info() { vcs_info }
|
||||
precmd_functions+=( precmd_vcs_info )
|
||||
setopt prompt_subst
|
||||
|
||||
# jj and git support
|
||||
zstyle ':vcs_info:*' enable git jj
|
||||
|
||||
zstyle ':vcs_info:jj:*' formats '%F{5}(jj) %b %F{1}%c%u %f'
|
||||
zstyle ':vcs_info:git:*' formats '%F{5}(git) %b %F{1}%c%u %f'
|
||||
|
||||
zstyle ':vcs_info:*' stagedstr 'M'
|
||||
zstyle ':vcs_info:*' unstagedstr '!'
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:jj:*' formats '%F{5}(jj) %b %F{1}%c%u %f'
|
||||
zstyle ':vcs_info:git:*' formats '%F{5}(git) %b %F{1}%c%u %f'
|
||||
|
||||
# git specific, finding unntracked files
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
|
||||
zstyle ':vcs_info:*' enable git jj
|
||||
+vi-git-untracked() {
|
||||
# Return early if we're not in git dir
|
||||
[ $(git rev-parse --is-inside-work-tree 2> /dev/null) = 'true' ] || return 0
|
||||
|
@ -48,10 +54,10 @@ _fix_cursor() {
|
|||
}
|
||||
|
||||
precmd () {
|
||||
RPROMPT="" # for some reason path added to RPROMPT in macOS, I have no idea where it's coming from
|
||||
# Force macOS to be a bit more sane
|
||||
RPROMPT=""
|
||||
vcs_info
|
||||
_fix_cursor
|
||||
}
|
||||
#RPROMPT=\$vcs_info_msg_0_
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#60C0FF,bold,underline"
|
||||
ZSH_AUTOSUGGEST_HISTORY_IGNORE="ls *,cd *"
|
||||
ZSH_AUTOSUGGEST_HISTORY_IGNORE="ls *,cd *,z *"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue