rtk-ai/rtk

The result of `rtk ls -la` is equivalent to `rtk ls`, which leads to the loss of some info.

Closed

#1672 opened on May 2, 2026

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Rust (48,085 stars) (2,914 forks)batch import
bugeffort-smallfilter-qualitygood first issue

Description

Problem

When running rtk ls -la, the permissions column (-rw-r--r--) and ownership columns (user group) are entirely stripped from output. The result:

# Native ls -la
-rw-r--r--@  1 user  staff  6144  May  1 23:00 .DS_Store
-rw-r--r--   1 user  staff   984  May  1 22:00 __init__.py

# rtk ls -la
.DS_Store  6.0K
__init__.py  984B

Users pass -la specifically to check permissions and ownership. Removing these columns makes -la equivalent to plain ls and forces a re-run without rtk when permissions actually matter.

Proposed Solution

Convert the permissions column to octal notation instead of deleting it:

# Expected
644  .DS_Store  6.0K
644  __init__.py  984B

Octal (644, 755, 600) is:

  • More compact than -rw-r--r-- (still saves tokens)
  • More precise — no ambiguity about setuid/setgid/sticky bits
  • Machine-parseable — consistent 3-4 digit format
  • What programmers already think in — nobody mentally translates rwx to bits

Comparison

Approach Token count Info preserved
Raw -rw-r--r--@ ~13 chars Full
Strip entirely (current) 0 None
Octal 644 3-4 chars Permission bits
Octal + owner 3-4 + N chars Permission + ownership

The octal approach is the sweet spot — compact yet informative.

Contributor guide