feat(eza): add token-optimized eza filter#1079
Open
Sathvik-1007 wants to merge 1 commit intortk-ai:developfrom
Open
feat(eza): add token-optimized eza filter#1079Sathvik-1007 wants to merge 1 commit intortk-ai:developfrom
Sathvik-1007 wants to merge 1 commit intortk-ai:developfrom
Conversation
strip icons, noise dirs, perms, timestamps flat/long/tree modes, 70%+ savings 21 unit tests, e2e verified linux
c4495d1 to
96185aa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1030
What
rtk eza— filter proxy for eza (modern ls replacement). 3 modes, noise stripped, tokens saved.Modes
-l)-T)--ignore-glob, summary lineFlag-aware
-a/--all/--almost-all→ skip noise filtering, show everything--gitcolumn → detected, parsed correctly (not confused with size)--oneline/-1→ flat mode, minimal already, still caps at 30--icons→ stripped from output (nerd font chars removed)--ignore-globalready set → we don't override user's glob--level=N→ passed through, no interferenceImplementation
src/cmds/system/eza_cmd.rs— 414 lines, 21 unit testsrun()→runner::run_filtered()+RunOptions::stdout_only().early_exit_on_failure()filter_flat(),filter_long(),filter_tree()— pure&str → Stringstrip_icon()— finds first ASCII byte, trims nerd font prefixis_size_like()— distinguishes git status cols (M-,N-) from sizes (4.0k,-)parse_long_line()— field-split parser, no regex neededNOISE_DIRSfromconstants.rsRtkRuleadded inrules.rs(pattern^eza(\s|$), savings 70%)Tests
cargo fmt + clippy + test→ 1371 passed, 0 failed, 6 ignored-a,-1, error path,--gitDocs updated
Not tested