lookfor-2.0.0 is not a library.
Visit the last successful build:
lookfor-3.0.0
lookfor
A cross-platform CLI tool to find and highlight files or folders that match a pattern.
Features
- Cross-platform
- Asynchronous
- Case-sensitive and insensitive search (insensitive by default)
- Customizable colored output for highlighting (can be disabled by setting a
NO_COLORenvironment variable to any value)
Installation
- From crates.io:
cargo install lookfor - From GitHub:
cargo install --git https://github.com/DarkCeptor44/lookfor - From releases.
- Manually:
Usage

<PATTERN> Pattern
)
Todo
- Add support for regular expressions.
- Add highlighting for every matching part of a line.
- Write better tests.
Tests
Benchmarks
The benchmarks were performed using Hyperfine at the root of the repository after running both cargo build and cargo build -r, to find anything with clap in the target directory.
TLDR
The new results are different even for dir, findstr and find but essentially:
- On Windows the async version is 24% faster than
dir, where sync version was 19%, and 1176% faster thanfindstr, where sync version was ~900% - On Linux the async version is 9% slower than
find, where sync version was 2% faster, this probably comes from the overhead oftokioand I don't think it's worth fixing
Windows
- AMD64, 32GB RAM, Ryzen 7 3800X, Windows 10.
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
dir /s /b *clap* |
56.9 ± 2.0 | 54.3 | 66.9 | 1.24 ± 0.18 |
findstr /s /m /c:clap * |
538.1 ± 18.3 | 525.7 | 577.7 | 11.76 ± 1.69 |
target\release\lookfor.exe clap |
45.8 ± 6.4 | 39.2 | 72.1 | 1.00 |
Linux
- ARM64, 1GB RAM, Orange Pi Zero2, Debian 12.
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
find . -iname "*clap*" |
20.5 ± 0.3 | 19.7 | 21.5 | 1.00 |
target/release/lookfor clap |
73.3 ± 1.3 | 70.6 | 76.5 | 3.57 ± 0.09 |
License
This project is licensed under the terms of the GNU General Public License version 3.