authorgravatar for jay@jayschwa.netJay Petacat <jay@jayschwa.net> 2025-11-25 23:25:27-07:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-26 14:16:08+01:00
logb6e1a100b802188e07fc994d28ea122a6c976169
treebc58da38ab39c7efdf74f75e457c88f8fe16901b
parent0b5b35c6964ea91133c82adbbd8ab3cf81388b26

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 files changed, 7 insertions(+), 7 deletions(-)

lib/std/Progress.zig+7-7
......@@ -698,13 +698,13 @@ const save = "\x1b7";
698698const restore = "\x1b8";
699699const finish_sync = "\x1b[?2026l";
700700
701const progress_remove = "\x1b]9;4;0\x07";
702const @"progress_normal {d}" = "\x1b]9;4;1;{d}\x07";
703const @"progress_error {d}" = "\x1b]9;4;2;{d}\x07";
704const progress_pulsing = "\x1b]9;4;3\x07";
705const progress_pulsing_error = "\x1b]9;4;2\x07";
706const progress_normal_100 = "\x1b]9;4;1;100\x07";
707const progress_error_100 = "\x1b]9;4;2;100\x07";
701const progress_remove = "\x1b]9;4;0\x1b\\";
702const @"progress_normal {d}" = "\x1b]9;4;1;{d}\x1b\\";
703const @"progress_error {d}" = "\x1b]9;4;2;{d}\x1b\\";
704const progress_pulsing = "\x1b]9;4;3\x1b\\";
705const progress_pulsing_error = "\x1b]9;4;2\x1b\\";
706const progress_normal_100 = "\x1b]9;4;1;100\x1b\\";
707const progress_error_100 = "\x1b]9;4;2;100\x1b\\";
708708
709709const TreeSymbol = enum {
710710 /// ├─