Skip to content

Commit b6e1a10

Browse files
jayschwaalexrp
authored andcommitted
std.Progress: Terminate progress escape codes with ST not BEL
`ST` is the "string terminator" and what is actually prescribed in the standard for escape codes. Use of `BEL` as a terminator is apparently a historical oddity that persists for compatibility. Unfortunately, not all terminals support using `BEL`, including Ubuntu's new default terminal, Ptyxis. Using `ST` should make it work in more terminals. Further reading: - https://en.wikipedia.org/wiki/ANSI_escape_code#Operating_System_Command_sequences - https://ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf
1 parent 0b5b35c commit b6e1a10

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/std/Progress.zig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -698,13 +698,13 @@ const save = "\x1b7";
698698
const restore = "\x1b8";
699699
const finish_sync = "\x1b[?2026l";
700700

701-
const progress_remove = "\x1b]9;4;0\x07";
702-
const @"progress_normal {d}" = "\x1b]9;4;1;{d}\x07";
703-
const @"progress_error {d}" = "\x1b]9;4;2;{d}\x07";
704-
const progress_pulsing = "\x1b]9;4;3\x07";
705-
const progress_pulsing_error = "\x1b]9;4;2\x07";
706-
const progress_normal_100 = "\x1b]9;4;1;100\x07";
707-
const progress_error_100 = "\x1b]9;4;2;100\x07";
701+
const progress_remove = "\x1b]9;4;0\x1b\\";
702+
const @"progress_normal {d}" = "\x1b]9;4;1;{d}\x1b\\";
703+
const @"progress_error {d}" = "\x1b]9;4;2;{d}\x1b\\";
704+
const progress_pulsing = "\x1b]9;4;3\x1b\\";
705+
const progress_pulsing_error = "\x1b]9;4;2\x1b\\";
706+
const progress_normal_100 = "\x1b]9;4;1;100\x1b\\";
707+
const progress_error_100 = "\x1b]9;4;2;100\x1b\\";
708708

709709
const TreeSymbol = enum {
710710
/// ├─

0 commit comments

Comments
 (0)