File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,11 @@ strip_first_column () {
6262}
6363
6464print_horizontal_rule () {
65- printf " %$( tput cols) s\n" | $SED ' s/ /─/g'
65+ let width=" $( tput cols) "
66+
67+ # echo -n '─' | hexdump -C
68+ local -r dash=$( printf " %b" " \xe2\x94\x80" )
69+ printf " %*s\n" " $width " | $SED " s/ /${dash} /g"
6670}
6771
6872print_header_clean () {
Original file line number Diff line number Diff line change @@ -43,3 +43,11 @@ if begin[m"
4343 output=$( load_fixture " noprefix" | $diff_so_fancy )
4444 refute_output --partial " diff --git setup-a-new-machine.sh"
4545}
46+
47+ @test " header format uses a native line-drawing character" {
48+ header=$( printf " %s" " $output " | head -n3 )
49+ run printf " %s" " $header "
50+ assert_line --index 0 --partial " [1;33m─────"
51+ assert_line --index 1 --partial " modified: fish/functions/ls.fish"
52+ assert_line --index 2 --partial " [1;33m─────"
53+ }
You can’t perform that action at this time.
0 commit comments