mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Add $theme_avoid_ambiguous_glyphs
Allow users to avoid ambiguous width glyphs to prevent issues with guessing the width of multibyte characters. For now, this just avoids `…`. We'll add some more if we run into them. Fixes #10
This commit is contained in:
parent
e71317aa19
commit
160bc9683e
@ -72,6 +72,7 @@ set -g theme_display_user yes
|
||||
set -g theme_title_display_process yes
|
||||
set -g theme_title_display_path no
|
||||
set -g theme_date_format "+%a %H:%M"
|
||||
set -g theme_avoid_ambiguous_glyphs yes
|
||||
set -g default_user your_normal_user
|
||||
```
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
# set -g theme_title_display_process yes
|
||||
# set -g theme_title_display_path no
|
||||
# set -g theme_date_format "+%a %H:%M"
|
||||
# set -g theme_avoid_ambiguous_glyphs yes
|
||||
# set -g default_user your_normal_user
|
||||
|
||||
set -g __bobthefish_current_bg NONE
|
||||
@ -324,8 +325,13 @@ function __bobthefish_prompt_git -d 'Display the actual git state'
|
||||
set -l new ''
|
||||
set -l show_untracked (git config --bool bash.showUntrackedFiles)
|
||||
if [ "$theme_display_git_untracked" != 'no' -a "$show_untracked" != 'false' ]
|
||||
set new (command git ls-files --other --exclude-standard)
|
||||
[ "$new" ]; and set new '…'
|
||||
if [ (command git ls-files --other --exclude-standard) ]
|
||||
if [ "$theme_avoid_ambiguous_glyphs" = 'yes' ]
|
||||
set new '...'
|
||||
else
|
||||
set new '…'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
set -l flags "$dirty$staged$stashed$ahead$new"
|
||||
|
Loading…
Reference in New Issue
Block a user