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: -a is ignored; -1 controls hidden-entry visibility instead #3608
In rtk ls, the -a flag has no effect on which entries are listed, and -1 — which should only control one-entry-per-line formatting — is what determines whether hidden entries appear. The result is that three of the four common flag combinations disagree with native ls.
Environment
rtk 0.45.0 (Homebrew)
macOS 26.3.1, arm64
Default config; no ls alias; LANG unset, LC_COLLATE=C
Deterministic across repeated runs. Exit code is 0 in all cases.
Expected
rtk ls should honour -a for hidden-entry inclusion, and -1 should affect formatting only. Concretely: without -a, entries beginning with . should be omitted; with -a, . and .. should be included.
Impact
On a real project directory this inflates the listing noticeably — a repo root here returns 25 entries from ls -1 and 32 from rtk ls -1, the extras being ., .., .DS_Store, .claude, .git, .gitignore, .superpowers. Since rtk exists to reduce tokens sent to an LLM, -1 listings are currently larger than the native command they replace, and consumers that count entries will over-count.
Possibly related
This may be a regression from the fix for #803 (rtk ls -1 returned empty output), which this version does resolve — -1 no longer returns (empty). I have not read the implementation, so the connection is a guess rather than a finding.
rtk ls has -a and -1 flag semantics swapped/conflated (hidden-entry filtering tied to -1 instead of -a, likely a regression from the #3527/#803 fix); restore correct flag independence so -a controls hidden entries and -1 only controls line formatting.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
📁 Relevant files
src/commands/ls.rs
Triaged automatically by wshm · This is an automated analysis, not a human review.
Partially fixed on develop — not labelling this resolved-pending-close, because one of the four rows still diverges.
Re-ran the table against a build of current develop (8b891a5c), LC_ALL=C, in the repro directory (visible.txt + .hidden):
form
native ls
rtk ls on develop
correct?
(no flags)
visible.txt
visible.txt
yes (was showing the dotfile)
-1
visible.txt
visible.txt
yes (was adding ., .., .hidden)
-a
. .. .hidden visible.txt
.hidden visible.txt
no — still omits . and ..
-1a
. .. .hidden visible.txt
.hidden visible.txt
no — same
So the -1-controls-hidden-entries half of this report is gone, and -a no longer has "no effect". What remains is narrower than the title: rtk ls -a lists dotfiles but drops the . and .. entries that native ls -a includes.
Worth deciding deliberately rather than fixing by reflex — ./.. in a compacted listing are arguably noise RTK is right to drop, in which case this should be closed as intended behaviour and the omission documented. Flagging for a maintainer call.
Fixed by #3470, shipped in v0.47.0: rtk ls -a lists hidden files, -1 is accepted and changes nothing, and the output is already one entry per line, so the two problems reported here no longer happen. . and .. are left out of the listing on purpose. If you still see a difference from native ls on the latest release, please comment with the command and the directory contents.
Activity
pszymkowiak commentedon Aug 19, 2026
🔍 Automated Triage
bughighSummary
rtk ls has -a and -1 flag semantics swapped/conflated (hidden-entry filtering tied to -1 instead of -a, likely a regression from the #3527/#803 fix); restore correct flag independence so -a controls hidden entries and -1 only controls line formatting.
📁 Relevant files
src/commands/ls.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
KuSh commentedon Sep 12, 2026
Partially fixed on
develop— not labelling thisresolved-pending-close, because one of the four rows still diverges.Re-ran the table against a build of current
develop(8b891a5c),LC_ALL=C, in the repro directory (visible.txt+.hidden):lsrtk lson developvisible.txtvisible.txt-1visible.txtvisible.txt.,..,.hidden)-a. .. .hidden visible.txt.hidden visible.txt.and..-1a. .. .hidden visible.txt.hidden visible.txtSo the
-1-controls-hidden-entries half of this report is gone, and-ano longer has "no effect". What remains is narrower than the title:rtk ls -alists dotfiles but drops the.and..entries that nativels -aincludes.Worth deciding deliberately rather than fixing by reflex —
./..in a compacted listing are arguably noise RTK is right to drop, in which case this should be closed as intended behaviour and the omission documented. Flagging for a maintainer call.KuSh commentedon Oct 3, 2026
Fixed by #3470, shipped in v0.47.0:
rtk ls -alists hidden files,-1is accepted and changes nothing, and the output is already one entry per line, so the two problems reported here no longer happen..and..are left out of the listing on purpose. If you still see a difference from nativelson the latest release, please comment with the command and the directory contents.