100 chars each

This commit is contained in:
2026-06-14 12:04:02 -05:00
parent ffbac811cb
commit b1b87816dd
+3 -3
View File
@@ -110,16 +110,16 @@
if test "$fish_prompt_pwd_dir_length" -eq 0 if test "$fish_prompt_pwd_dir_length" -eq 0
echo $tmp echo $tmp
else else
# Shorten to at most $fish_prompt_pwd_dir_length characters per directory # Shorten to at most 100 characters per directory
# with full-length-dirs components left at full length. # with full-length-dirs components left at full length.
set -l full set -l full
if test $fish_prompt_pwd_full_dirs -gt 0 if test $fish_prompt_pwd_full_dirs -gt 0
set -l all (string split -m (math $fish_prompt_pwd_full_dirs - 1) -r / $tmp) set -l all (string split -m (math 100 - 1) -r / $tmp)
set tmp $all[1] set tmp $all[1]
set full $all[2..] set full $all[2..]
else if test $fish_prompt_pwd_full_dirs -eq 0 else if test $fish_prompt_pwd_full_dirs -eq 0
# 0 means not even the last component is kept # 0 means not even the last component is kept
string replace -ar '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*' '$1' $tmp string replace -ar '(\.?[^/]{'"100"'})[^/]*' '$1' $tmp
continue continue
end end