Skip to content

Fix ls one flag parsing#829

Open
msegoviadev wants to merge 1 commit intortk-ai:developfrom
msegoviadev:fix/ls-one-flag-parsing
Open

Fix ls one flag parsing#829
msegoviadev wants to merge 1 commit intortk-ai:developfrom
msegoviadev:fix/ls-one-flag-parsing

Conversation

@msegoviadev
Copy link

Summary

  • Filters 11 ls flags that break compact_ls parsing (no metadata, wrong columns, multi-column output)
  • Filters 2 flags that cause visual issues (duplicate / on directories)
  • Adds integration tests for filtered flags in scripts/test-all.sh

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test - all tests pass (41 ls tests)
  • Manual testing: rtk ls -1 - no longer shows (empty)
  • Manual testing: rtk ls -F and rtk ls -p - no duplicate / on directories
  • Integration tests: bash scripts/test-all.sh - 5 new tests for filtered flags

Important: All PRs must target the develop branch (not master).
See CONTRIBUTING.md for details.

@CLAassistant
Copy link

CLAassistant commented Mar 25, 2026

CLA assistant check
All committers have signed the CLA.

@msegoviadev
Copy link
Author

This should fix #803

@msegoviadev
Copy link
Author

Please maintainers, let me know if I should revert the changes on the

  • cargo files
  • release please
  • changelog
    after the latest rtk update.

@aeppling
Copy link
Contributor

Hey

We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes src/ from a flat layout into subfolders.

No logic changes — only file moves and import path updates.

What you need to do

Rebase your branch on develop when receiving this comment:

git fetch origin && git rebase origin/develop

Git detects renames automatically. If you get import conflicts, update the paths:

use crate::git;        // now: use crate::cmds::git::git;
use crate::tracking;   // now: use crate::core::tracking;
use crate::config;     // now: use crate::core::config;
use crate::init;       // now: use crate::hooks::init;
use crate::gain;       // now: use crate::analytics::gain;

Need help rebasing? Tag @aeppling

Flags -1, -C, -m, -D, -g, -o, -i, -s, -x produce output incompatible
with compact_ls which expects ls -la format (9+ columns). Flags -F and
-p cause duplicate / suffixes on directories. Also filter -l/-a/-h
which RTK handles separately.

Fixes empty output when running `rtk ls -1`.
@msegoviadev msegoviadev force-pushed the fix/ls-one-flag-parsing branch from f866f23 to 6480b3d Compare March 26, 2026 20:29
@msegoviadev
Copy link
Author

done @aeppling
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants