Skip to content

e-matteson/pretty-locate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pretty-locate

A simple tool that’s similar to Unix locate, but produces concise and nicely formatted output.

Written in rust. Work in progress.

TODO example output

Database creation

We currently use GNU find to get the paths of all files. We exclude some paths, directory names, and filesystem types. However, there are probably situations where it won’t handle multiple filesystems gracefully.

Searching

It accepts one regex pattern. Unlike mlocate, it does not accept globs.

Todo

Features

Add more cmdline args

From mlocate:

  • basename
  • wholename
  • ignorecase
  • count
  • limit
  • database
  • existing
  • (symlink handling options)

Other:

  • no-color
  • no-collapse

Accept multiple patterns?

Optimize for speed

BTreeMaps are nicely alphabetized, but slower. Is it faster to sort later? Use faster hash.

Do proper error-handling with Result

Consider file permissions issues

It’s fine as long as each user creates their own database.

Optionally check existence of files

Consider removing find dependency

Maybe use WalkDir crate instead. How does it handle different filesystems?

Use config file for database creation options

pretty-locate.toml

Bugs

About

A wrapper around Unix locate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages