1
0

add changes from work workstation

This commit is contained in:
2026-04-13 19:29:57 +02:00
parent 298e81add0
commit 7cc34cbda4
13 changed files with 319 additions and 51 deletions

View File

@@ -47,10 +47,6 @@ fpath=("$DOTFILES/zsh/zsh-completions/src" $fpath)
source "$DOTFILES/zsh/completion.zsh"
source "$DOTFILES/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
# export starship_precmd_user_func="set_win_title"
#
# eval "$(starship init zsh)"
autoload -Uz vcs_info
setopt prompt_subst
@@ -118,9 +114,9 @@ function +vi-git-extra() {
# Check if upstream exists before trying to get ahead/behind counts
if git rev-parse --verify ${hook_com[branch]}@{upstream} >/dev/null 2>&1; then
local ahead_behind=$(git rev-list --left-right --count HEAD...${hook_com[branch]}@{upstream} 2>/dev/null)
local ahead=$(echo $ahead_behind | awk '{print $1}')
local behind=$(echo $ahead_behind | awk '{print $2}')
local split=($=ahead_behind)
local ahead=$split[1]
local behind=$split[2]
[[ $ahead -gt 0 ]] && hook_com[misc]+="+"${ahead}
[[ $behind -gt 0 ]] && hook_com[misc]+=${hook_com[misc]:+"/"}"-"${behind}
fi