Project

lsd-rb

0.0
The project is in a healthy, maintained state
List directory contents with a modern, colorful interface
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.0
~> 13.0
~> 3.0
~> 1.3

Runtime

~> 1.1
~> 0.6.0
 Project Readme

LSD

A modern alternative to the ls command inspired by Nushell's output, written in Ruby.

LSD

Features

  • Tabular output with colors
  • Column filtering via command line
  • High performance through lazy loading
  • Mac and Linux support

Installation

  1. Install gem (recommended)
gem install lsd-rb
  1. Use the installation script
git clone https://github.com/aristotelesbr/lsd
cd lsd
./install.sh
  1. Manual installation

The installation script will:

  1. Check if Ruby is installed (>= 3.0)
  2. Install necessary dependencies
    $ bundle install
  3. Compile the program if needed
    $ chmod +x bin/lsd
  4. Move the binary to /usr/local/bin

Usage

# List current directory
lsd

# List a specific directory
lsd ~/Downloads

# Filter by name and type only
lsd --filter-by "name,type"

# Show help
lsd --help

Available Columns

  • name: File/directory name
  • size: Size in human format (KB, MB, etc)
  • type: File type (file, directory, symlink)
  • perms: Unix permissions format
  • owner: Owner
  • modified: Modification date

The index column (#) is always shown.

Project Structure

.
├── bin/
│   └── lsd         # Main executable
├── lib/
│   ├── lsd.rb      # Main code
│   ├── entry.rb    # Directory entry class
│   └── formatter.rb # Table formatting
├── install.sh      # Installation script
└── README.md       # This documentation

Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/aristotelesbr/lsd. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Lsd project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.