gitmyhub

lsd

Rust ★ 16k updated 18d ago

The next gen ls command

LSD is a modern drop-in replacement for the ls terminal command that adds color-coded output, file-type icons, and a tree view to make browsing folders faster and easier to read.

RustCargosetup: easycomplexity 1/5

LSD, short for LSDeluxe, is a modern replacement for the classic ls command that lists the contents of a folder in a terminal. The README describes it as a rewrite of GNU ls with lots of added features, heavily inspired by an earlier project called colorls. Instead of a plain list of filenames, lsd gives you colored output, an icon next to each entry that hints at the file type, a tree view that descends into subfolders, and a wider range of formatting options.

The way it works is the same as ls in spirit: you point it at a folder (or no folder, to list the current one) and it prints what is inside. Behind the scenes it categorises each entry by extension or role and looks up an icon and color for it. For the icons to render correctly in your terminal you need a patched "Nerd Font" or font-awesome installed and selected, since the icons are drawn using special glyphs added to those fonts. Behavior, colors, and icons are all themeable through three optional YAML config files (config.yaml, colors.yaml, icons.yaml), and the docs ship sample versions of each so you only have to override what you want to change. Many users set a shell alias such as alias ls='lsd' so the new command takes over from the original, with handy variants like alias lt='lsd --tree' for quick tree views.

Someone would use lsd to make their terminal more readable day to day, especially when navigating large folders or scanning code repositories. The project is written in Rust, distributed through most major package managers (Homebrew, Scoop, apt, dnf, pacman, and many more) as well as via cargo install lsd. The full README is longer than what was provided.

Where it fits