1 stable release
| 5.1.0 | Mar 7, 2026 |
|---|
#722 in Command line utilities
110KB
2.5K
SLoC
π ls-f
ls-f is a modern, blazing-fast ls replacement. Originally a bash wrapper, it has been completely rewritten in Rust (v5.0.0) to provide superior performance, a native tree view, and zero runtime dependencies.
β¨ Key Features
- π Performance: Native Rust implementation, matching GNU
lsspeed even with icons and colors. - π¨ Nerd Font Icons: Rich set of icons for hundreds of file types and extensions.
- π³ Tree View: Recursive tree visualization built-in via
--tree. - πΏ Git Integration: View file git status (staged, modified, etc.) with
--git. - π ANSI Colors: Intelligent colorization for file types, permissions, and metadata.
- βοΈ GNU Compatibility: Supports standard flags:
-l,-a,-R,-h,-t,-S,-v, and more. - π¦ Zero Dependencies: Single static binaryβno Bash or Python required for the Rust version.
π Benchmarks (v5.0.0)
lsf is optimized for speed. Benchmarked against GNU ls (coreutils 9.1) with --color=always.
| Scenario | GNU ls | lsf | Winner |
|---|---|---|---|
| Small dir (grid) | 0.75 ms | 0.65 ms | π lsf |
| Large dir (7.3k files) | 10.2 ms | 12.9 ms | π GNU ls |
| Long format (large dir) | 18.4 ms | 18.3 ms | π lsf |
| Tree View (recursive) | N/A | 17.2 ms | π lsf |
Icons add ~0% measurable overhead to lsf. See BENCHMARKS.md for details.
π Installation
Prerequisites
- A Nerd Font must be set in your terminal for icons to render.
1. Build from Source (Rust - Recommended)
The Rust version (v5.0.0) provides the best performance and features.
git clone https://github.com/swadhinbiswas/ls-f.git
cd ls-f
make install # Installs to /usr/local/bin
Or via cargo: cargo install --path .
π Usage
Simply use lsf where you would use ls.
lsf # Grid view with icons
lsf -la # Long format, hidden files
lsf --tree # Recursive tree view
lsf --git # Show git status indicators
lsf --depth 2 # Limit tree/recursive depth
Setting up the Alias
Add this to your shell profile (.bashrc, .zshrc, or .config/fish/config.fish):
alias ls='lsf'
π§ Troubleshooting
- Icons look like boxes? You need a Nerd Font. Check terminal font settings.
- Command not found? Ensure
/usr/local/binor~/.local/binis in your$PATH. - Colors missing? Ensure your terminal supports ANSI colors. Try
lsf --color=always.
Detailed guides:
π€ Contributing
Contributions are welcome!
- Fork the repo.
- Create your branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
π Support the Project
If you find ls-f helpful, consider supporting its development:
- GitHub Sponsors: swadhinbiswas
- Binance Pay / Crypto:
swadhinbiswas.cse@gmail.com
Recent Sponsors
π License
Distributed under the MIT License. See LICENSE for details.
Created by swadhinbiswas
Dependencies
~4.5β9.5MB
~194K SLoC