Fish, fix pull/push prompt and change characters

The prompt has been broken for a while now on pull/push, this is because
it was using unicode characters that were larger in the terminal,
causing wraps that would reprint lines. I changed the characters for
push/pull because of it.

I also removed the stash character, and changed the dirty and staged
characters to match the new characters
This commit is contained in:
Julia Lange 2025-04-16 11:52:16 -07:00
parent 8cd1945b3b
commit 90f4128164
Signed by: Julia
SSH key fingerprint: SHA256:50XUMcOFYPUs9/1j7p9SPnwASZ7QnxXm7THF7HkbqzQ

View file

@ -43,22 +43,22 @@ if git_is_repo
if test (command git ls-files --others --exclude-standard | wc -w 2> /dev/null) -gt 0 if test (command git ls-files --others --exclude-standard | wc -w 2> /dev/null) -gt 0
set git_meta "$git_meta?" set git_meta "$git_meta?"
end end
if test (command git rev-list --walk-reflogs --count refs/stash 2> /dev/null) # if test (command git rev-list --walk-reflogs --count refs/stash 2> /dev/null)
set git_meta "$git_meta\$" # set git_meta "$git_meta\$"
end # end
if git_is_touched if git_is_touched
git_is_dirty && set git_meta "$git_meta" git_is_dirty && set git_meta (string join "$git_meta" "x")
git_is_staged && set git_meta "$git_meta" git_is_staged && set git_meta (string join "$git_meta" "o")
end end
set -l commit_count (command git rev-list --count --left-right (git remote)/(git_branch_name)"...HEAD" 2> /dev/null) set -l commit_count (command git rev-list --count --left-right (git remote)/(git_branch_name)"...HEAD" 2> /dev/null)
if test $commit_count if test $commit_count
set -l behind (echo $commit_count | cut -f 1) set -l behind (echo $commit_count | cut -f 1)
set -l ahead (echo $commit_count | cut -f 2) set -l ahead (echo $commit_count | cut -f 2)
if test $behind -gt 0 if test $behind -gt 0
set git_meta "$git_meta🠋" set git_meta "$git_meta«"
end end
if test $ahead -gt 0 if test $ahead -gt 0
set git_meta "$git_meta🠉" set git_meta "$git_meta»"
end end
end end
if test $git_meta if test $git_meta