1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 10:22:00 +00:00

fix(jump): even spacing between marks (#11601)

This commit is contained in:
Alexander Huynh 2023-04-07 07:35:12 -04:00 committed by GitHub
parent 49d34d00cd
commit 01c82c381d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,12 +35,11 @@ marks() {
max=${#link:t}
fi
done
local printf_markname_template="$(printf -- "%%%us " "$max")"
local printf_markname_template="$(printf -- "%%%us" "$max")"
for link in $MARKPATH/{,.}*(@N); do
local markname="$fg[cyan]${link:t}$reset_color"
local markname="$fg[cyan]$(printf -- "$printf_markname_template" "${link:t}")$reset_color"
local markpath="$fg[blue]$(readlink $link)$reset_color"
printf -- "$printf_markname_template" "$markname"
printf -- "-> %s\n" "$markpath"
printf -- "%s -> %s\n" "$markname" "$markpath"
done
}