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
rtk ls -1 returns empty output unconditionally #3527
-a and -l both work fine and produce the normal compact summary — only -1 (one-per-line) is affected.
Not a TTY-detection issue: bare, piped, and file-redirected calls are all equally empty.
Found while auditing Claude Code hook rewrite coverage — rtk rewrite "ls -1" correctly emits rtk ls -1, so the hook silently routes any raw ls -1 into this empty-output path with no error surfaced to the caller.
rtk ls -1 (one-per-line output) produces empty output in all invocation modes; recommend fixing the output formatter for the -1 flag and surfacing an error rather than silently succeeding.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
📁 Relevant files
src/ls.rs
Triaged automatically by wshm · This is an automated analysis, not a human review.
Confirmed fixed — thanks @davidalecrim1. Reproduced the before/after side by side on macOS (aarch64):
$ mkdir -p /tmp/repro &&cd /tmp/repro && touch a.txt b.txt
# 0.34.1 (the version in the report)
$ rtk ls -1
(no output, exit 0)
# 0.45.0
$ rtk ls -1
.
..
a.txt
b.txt
$ rtk ls -1 | cat
.
..
a.txt
b.txt
Empty-output bug is gone in 0.45.0 in both bare and piped modes, so this can be closed.
One follow-up worth a separate look, and I've corrected an earlier version of this comment where I described it imprecisely. On a real repo checkout, -1 does not just change the layout — it changes the entry set two ways:
$ rtk ls | <extract names> | sort -u | wc -l # 158
$ rtk ls -1 | <extract names> | sort -u | wc -l # 168
$ ls -1A | sort -u | wc -l # 166 (system ls, BSD)
# the 10 entries `rtk ls -1` has that `rtk ls` does not:
. .. .DS_Store .git .mypy_cache .pytest_cache .venv .vscode __pycache__ node_modules
So -1 (a) emits . and .., which GNU/BSD ls -1 never does, and (b) bypasses the noise filter that plain rtk ls applies to VCS/build/cache dirs. Plain rtk ls does still show ordinary dotfiles like .gitignore, so this isn't simply -1 implying -a — it's a different entry set from both rtk ls and system ls. That will surprise anything piping it into xargs/wc -l. Happy to file it as its own issue if useful.
This is fixed. rtk ls -1 prints the listing again in bare, piped and redirected forms, confirmed on the current code, and the follow-up you noted (-1 emitting ./.. and bypassing the noise filter) is fixed as well by the dotfile-semantics change shipped in v0.49.0. If you still see empty output on the latest version, comment here and we will reopen.
Activity
pszymkowiak commentedon Aug 10, 2026
🔍 Automated Triage
bughighSummary
rtk ls -1(one-per-line output) produces empty output in all invocation modes; recommend fixing the output formatter for the -1 flag and surfacing an error rather than silently succeeding.📁 Relevant files
src/ls.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
davidalecrim1 commentedon Aug 11, 2026
@ReeveBarthelme Can you update RTK and try again? I tested this out on the version
0.43.0and it works for me in MacOS:ReeveBarthelme commentedon Aug 12, 2026
Confirmed fixed — thanks @davidalecrim1. Reproduced the before/after side by side on macOS (aarch64):
Empty-output bug is gone in 0.45.0 in both bare and piped modes, so this can be closed.
One follow-up worth a separate look, and I've corrected an earlier version of this comment where I described it imprecisely. On a real repo checkout,
-1does not just change the layout — it changes the entry set two ways:So
-1(a) emits.and.., which GNU/BSDls -1never does, and (b) bypasses the noise filter that plainrtk lsapplies to VCS/build/cache dirs. Plainrtk lsdoes still show ordinary dotfiles like.gitignore, so this isn't simply-1implying-a— it's a different entry set from bothrtk lsand systemls. That will surprise anything piping it intoxargs/wc -l. Happy to file it as its own issue if useful.KuSh commentedon Sep 12, 2026
Fixed on
develop, not yet in a release — labellingresolved-pending-closerather than closing.Re-ran the repro against a build of current
develop(8b891a5c),LC_ALL=C:Output is present, so the unconditional-empty behaviour is gone.
KuSh commentedon Sep 13, 2026
This is fixed.
rtk ls -1prints the listing again in bare, piped and redirected forms, confirmed on the current code, and the follow-up you noted (-1emitting./..and bypassing the noise filter) is fixed as well by the dotfile-semantics change shipped in v0.49.0. If you still see empty output on the latest version, comment here and we will reopen.