From e8b39c99c9d4bce62777ed091e8a4c9cc186facf Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Wed, 20 May 2020 16:35:52 -0600 Subject: Fix a couple git related bugs in k.zsh --- base/zsh/k.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'base') diff --git a/base/zsh/k.zsh b/base/zsh/k.zsh index 0b2cc5e..dc95e93 100644 --- a/base/zsh/k.zsh +++ b/base/zsh/k.zsh @@ -341,7 +341,7 @@ k () { if [[ ${#sv[size]} -gt $MAX_LEN[5] ]]; then MAX_LEN[5]=${#sv[size]}; fi fi - LNAME="${sv[name]}" + LNAME="'${sv[name]}" if [[ -n ${sv[link]} ]]; then LNAME="$LNAME -> ${sv[link]}"; fi if [[ ${#LNAME} -gt $MAX_LEN[6] ]]; then MAX_LEN[6]=${#LNAME}; fi @@ -531,7 +531,7 @@ k () { (D) REPOMARKER=$'\e[0;31m+\e[0m';; # Tracked & Dirty (M) REPOMARKER=$'\e[0;32m+\e[0m';; # Tracked & Dirty & Added (\?\?) REPOMARKER=$'\e[38;5;16m+\e[0m';; # Untracked - (!!) REPOMARKER=$'\e[38;5;19|\e[0m';; # Ignored + (!!) REPOMARKER=$'\e[38;5;19m-\e[0m';; # Ignored (A) REPOMARKER=$'\e[0;32m+\e[0m';; # Added (N) REPOMARKER=' ';; # Not a repo (*) REPOMARKER=$'\e[0;32m|\e[0m';; # Clean @@ -544,7 +544,7 @@ k () { REPOPAD="'$NAME" if [[ -n $SYMLINK_TARGET ]]; then REPOPAD="$REPOPAD $SYMLINK_TARGET"; fi REPOPAD="$(echo "${(l:MAX_LEN[6]:)REPOPAD}" | sed 's/\S.*//')" - REPOBRANCH="$REPOPAD"$'\e['"$K_COLOR_BR"'m'"$REPOBRANCH"$'\e[0m' + REPOBRANCH=" $REPOPAD"$'\e['"$K_COLOR_BR"'m'"$REPOBRANCH"$'\e[0m' fi # -------------------------------------------------------------------------- -- cgit v1.2.3-70-g09d2