mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2025-06-13 13:03:54 +00:00
Make git branch abbreviation optional
This commit is contained in:
parent
3b2e847fcc
commit
e278b5c304
@ -70,6 +70,10 @@ function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish
|
||||
and echo $branch_glyph
|
||||
and return
|
||||
|
||||
[ "$theme_truncate_git_branch" != 'yes' ]
|
||||
and string replace 'refs/heads/' "$branch_glyph " $ref
|
||||
and return
|
||||
|
||||
# truncate the middle of the branch name, but only if it's 25+ characters
|
||||
set -l truncname (string replace -r '^(.{28}).{3,}(.{5})$' "\$1…\$2" $ref)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user