Skip to content

tamada/lis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

🐿️ lis

build Coverage Status

CC-0 Version DOI

lis is a modern, feature-rich directory listing tool written in Rust. It aims to provide a better alternative to ls with built-in support for Git status, icons, and multiple output formats. This product is an example project for learning Rust and the development process of open source software. It is not intended for production use.

🗣️ Overview

lis provides a library and a CLI tool for listing directory entries with advanced features like Git status, icons, and multiple output formats.

🚀 Features

  • Git Integration: Shows Git status for files and directories (A, M, D, R, T).
  • Icons: Beautiful icons for different file types (requires a Nerd Font).
  • Multiple Formats: Support for Plain, CSV, JSON, and YAML output.
  • Sorting: Sort by Name, Time, Size, or Extension.
  • Filtering: Respects .gitignore by default.
  • Recursive: Supports recursive directory listing.
  • Colorized Output: High-quality colorized output based on LS_COLORS.

📦 Installation

cargo install --path .

💻 Usage (CLI)

Basic listing

lis

Long format with icons

lis -l --icon

Recursive listing including hidden files

lis -R -a

Export to JSON

lis --format json > entries.json

Sort by size in reverse order

lis --sort size -r

For more CLI details, see cli/README.md.

📖 Library Usage

lis can also be used as a library in your Rust projects.

use lis::LisBuilder;

fn main() {
    let lis = LisBuilder::new()
        .all(true)
        .recursive(false)
        .build(".");

    let entries = lis.list();
    for entry in entries {
        println!("{}: {}", entry.name, entry.git_status);
    }
}

Check the examples directory for more details.

ℹ️ About

👨‍💼​ Developers 👩‍💼

🎃 Logo

logo

This icon is created by yukyik and distributed on Flaticon.

📄 License

This project is licensed under CC-0 1.0 Universal. See the LICENSE file for details.

About

Minimal and alternative ls implementation in Rust.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages