Skip to content

rtk grep returns empty output + rtk ls produces worse output than standard ls #4

@FlorianBruniaux

Description

@FlorianBruniaux

Bug #1: rtk grep Returns Empty Output

Current Behavior:

$ rtk grep "Claude Code" guide/
# Returns 0 bytes (empty)

Expected Behavior:

$ rtk grep "Claude Code" guide/
guide/ultimate-guide.md: Claude Code is...
guide/cheatsheet.md: Claude Code cheatsheet
(condensed, grouped by file)

Root Cause: Unknown (needs investigation in Rust code)

Suggested Fix: Implement file grouping + context lines (similar to grep -C 1 but condensed)


Bug #2: rtk ls Produces Worse Output (-274% increase)

Current Behavior:

$ ls -la
2,058 chars

$ rtk ls
7,704 chars (-274% WORSE)

Issue: RTK ls is more verbose than standard ls

Benchmark data:

Command Baseline RTK Reduction Status
git log 13,994 1,076 92.3% ✅ Excellent
git status 100 24 76.0% ✅ Good
git diff HEAD~1 15,815 6,982 55.9% ✅ Good
ls -la 2,058 7,704 -274% ❌ Broken
grep -r "pattern" 54,302 0 N/A ❌ Broken

Suggested Fix:

  • Option A: Remove rtk ls command (acknowledge limitation)
  • Option B: Implement ultra-dense format (single line per file, no metadata)

Proposed Format:

# Standard ls -la (2058 chars)
total 1024
drwxr-xr-x  10 user  staff   320 Jan 28 10:00 .
drwxr-xr-x  50 user  staff  1600 Jan 27 09:00 ..
-rw-r--r--   1 user  staff  5432 Jan 28 10:00 file1.md
...

# Proposed rtk ls (<500 chars target)
. (10) .. (50) file1.md (5K) file2.txt (12K) ...

Environment

  • OS: macOS 14.6 (ARM64)
  • RTK: v0.2.0
  • Test Repo: claude-code-ultimate-guide (9900 lines, 200+ commits)

Additional Context

Full benchmark report available upon request (53KB, 12 commands tested).

See also: Issue #3 for T3 Stack support proposals (pnpm, Vitest).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions