You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tr: handle trailing-backslash warnings for both sets
tr checked only SET1 for an unescaped trailing backslash, so SET2 never
produced GNU's portability warning. Warning writes also went through
helpers that discard stderr errors, so redirecting a warning to /dev/full
still exited successfully.
Move terminal-backslash detection from the SET1-only pre-scan in tr.rs to
operand parse completion, so SET1 and SET2 are checked in parse order and
the warning follows any warning emitted while scanning the same operand.
Parse both operands before applying semantic validation, so SET2 warnings
and syntax errors surface ahead of a semantic rejection of a
syntactically valid SET1.
Add a tr-local checked diagnostic writer that records exit status 1 when
a warning cannot be written, without returning early, so stdin processing
and stdout output continue. Route tr's existing ambiguous-octal and
invalid-UTF-8 warnings through the same writer. The shared uucore
diagnostic macros are unchanged.
Move the localized "warning: " label into the tr-warning-* Fluent
messages so the label and its locale-specific punctuation are translated
rather than hardcoded in Rust. This changes two existing message keys
from warning bodies into complete warnings.
tr-warning-unescaped-backslash = warning: an unescaped backslash at end of string is not portable
25
-
tr-warning-ambiguous-octal-escape = the ambiguous octal escape \{$origin_octal} is being interpreted as the 2-byte sequence \0{$actual_octal_tail}, {$outstand_char}
26
-
tr-warning-invalid-utf8 = invalid utf8 sequence
25
+
tr-warning-ambiguous-octal-escape = warning: the ambiguous octal escape \{$origin_octal} is being interpreted as the 2-byte sequence \0{$actual_octal_tail}, {$outstand_char}
0 commit comments