-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Search Git Status] use box drawing chars for staged/unstaged header
- Loading branch information
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
# helper for _fzf_preview_changed_file | ||
# prints out something like | ||
# +--------+ | ||
# | Staged | | ||
# +--------+ | ||
# โญโโโโโโโโโฎ | ||
# โ Staged โ | ||
# โฐโโโโโโโโโฏ | ||
function _fzf_report_diff_type --argument-names diff_type --description "Print a distinct colored header meant to preface a git patch." | ||
# number of "-" to draw is the length of the string to box + 2 for padding | ||
set repeat_count (math 2 + (string length $diff_type)) | ||
set horizontal_border +(string repeat --count $repeat_count -)+ | ||
set line (string repeat --count $repeat_count โ) | ||
set top_border โญ$lineโฎ | ||
set btm_border โฐ$lineโฏ | ||
|
||
set_color yellow | ||
echo $horizontal_border | ||
echo "| $diff_type |" | ||
echo $horizontal_border | ||
echo $top_border | ||
echo "โ $diff_type โ" | ||
echo $btm_border | ||
set_color normal | ||
end |