mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-15 22:44:01 +00:00
d5db260375
This checked the locale, but did so in a way that's fundamentally broken: 1. $LANG isn't the only variable ($LC_ALL and $LC_CTYPE) 2. Even if $LANG is set that doesn't mean it's actually working We could add a `status is-multibyte` here to figure out if we have a multibyte locale? But instead, since this is dealing with adding an ellipsis, let's just add it to `string ellipsize`. One slight difference is that shortening the branch now counts the ellipsis width. I.e. assuming the branch is "long-branch-name" ```fish set -g __fish_git_prompt_shorten_branch_len 8 ``` might now print "long-br…" instead of "long-bra…". This is nicer because we can now give the actual maximum width. The alternative is to add a "--exclusive" option to "string ellipsize" that doesn't count the ellipsis width. So `string ellipsize --char "..." --max 8" long-branch-name` might result in "long-bra...", which is 11 wide. |
||
---|---|---|
.. | ||
completions | ||
functions | ||
groff | ||
tools | ||
__fish_build_paths.fish.in | ||
config.fish | ||
lynx.lss |