ls

built-in
-24.9% Savings
533 Commands
-12389 Tokens saved
2 Tests

Install

tokf install 21630cb12889a9e3db4bc0c24a9ffea478e9c101e95626f8935006e01a3abcb4
Safety checks passed

Filter definition

command = "ls"
description = "Cap output at 50 lines for large directories"

[on_success]
head = 50

[on_failure]
tail = 5

Examples

failed ls shows error message ~14 tokens → ~14 tokens
Raw output
ls: cannot access '/no/such/dir': No such file or directory
Filtered output
ls: cannot access '/no/such/dir': No such file or directory
ls output passes through unchanged ~5 tokens → ~5 tokens
Raw output
Cargo.toml
src
tests
Filtered output
Cargo.toml
src
tests
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.
Browse all filters