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
{{ message }}
Repository navigation
cat -n a b is rewritten to rtk read -n a b, which restarts the numbering at each file and names no file #4889
cat -n a b is rewritten to rtk read -n a b, which numbers each file from 1 with nothing marking where one file ends and the next begins. GNU cat -n a b keeps counting across files.
Either the numbering of cat -n, which keeps counting across files (line 10 = b.txt line 1), or numbers per file with a header for each file, so the agent can tell which file a line comes from.
Actual
The numbering restarts at 1 for each file and no file name is printed (exit 0). On develop 41e6912 with the │ separator, the same thing happens. Once #4647's tab separator lands, the output looks exactly like cat -n output, so a line number the agent got from an earlier native cat -n a b points at a different line.
The guard that decides this rewrite is being reworked in #4593 and #4341 (cat_options_map_to_read); requiring exactly one file there would also close this.
cat -n a b → rtk read -n a b restarts numbering per file and prints no filename, breaking line-number correspondence with native cat -n; tighten the cat→read rewrite guard to only fire for single-file invocations.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
Activity
rtk-wshm-sync-bot commentedon Oct 31, 2026
🔍 Automated Triage
bugmediumSummary
cat -n a b→rtk read -n a brestarts numbering per file and prints no filename, breaking line-number correspondence with nativecat -n; tighten the cat→read rewrite guard to only fire for single-file invocations.📁 Relevant files
src/cmds/cat_options_map_to_read.rsSuggested Actions
rtk read -n(target of thecat -nrewrite) drops carriage returns and adds a final newline #4816 (rtk read -n already mishandles CR/final newline) and fix(read): separate line numbers with a tab #4647 (separator change)cat -n a.txt b.txtvsrtk read -n a.txt b.txton multi-file inputTriaged automatically by wshm · This is an automated analysis, not a human review.