✨ ls-f

A Beautiful ls with Icons 🎨

Transform your terminal with file-type-specific icons and colors

🌟 Key Features

🎨

Visual Clarity

Instantly recognize files with type-specific icons using Nerd Fonts. Never get confused again!

βš™οΈ

Full Compatibility

Supports all standard ls flags: -a, -l, -R, and more.

πŸš€

Lightning Fast

Minimal overheadβ€”runs as fast as the standard ls command.

🎯

Customizable

Override icons and colors via configuration file to match your style.

πŸ”„

Cross-Platform

Works on Linux, macOS, WSL, and other Unix-like systems.

πŸ›‘οΈ

Safe Fallbacks

Automatically disables icons on incompatible systems. Works without Nerd Fonts.

πŸ“Ί Live Demo

ls-f example output

Grid View (Default)

$ lsf
LICENSE README.md column.py config/
install.sh lsf INSTALL.md docs/

Long Format

$ lsf -l
drwx------ 4 swadhin swadhin 4096 Oct 16 10:32 config/
-rwxr-xr-x 1 swadhin swadhin 10K Oct 16 10:31 lsf
-rw-r--r-- 1 swadhin swadhin 2.5K Oct 16 10:30 README.md
-rw-r--r-- 1 swadhin swadhin 948 Oct 16 10:29 column.py

πŸš€ Quick Installation

Method 1: One-Liner

Fastest - downloads both files automatically

curl -fsSL https://raw.githubusercontent.com/
swadhinbiswas/ls-f/main/install-standalone.sh | bash

# Verify
lsf --version
lsf -x

Method 2: Git Clone

For development and customization

git clone https://github.com/swadhinbiswas/
ls-f.git && cd ls-f && ./install.sh --user

Method 3: Direct Download

Download both files manually

sudo curl -fL https://raw.githubusercontent.com/\
swadhinbiswas/ls-f/main/lsf -o /usr/local/bin/lsf
sudo curl -fL https://raw.githubusercontent.com/\
swadhinbiswas/ls-f/main/column.py -o /usr/local/bin/column.py
sudo chmod +x /usr/local/bin/lsf /usr/local/bin/column.py

Setup Alias (Optional)

Replace your default ls with lsf:

echo "alias ls='lsf'" >> ~/.bashrc
source ~/.bashrc

For Zsh, use ~/.zshrc instead.

πŸ“– Usage Examples

lsf              # List files with icons
lsf -a           # List all files (including hidden)
lsf -A           # Almost all (skip . and ..)
lsf -l           # Long format
lsf -la          # Long format + all files
lsf -x           # Horizontal layout
lsf -X           # Sort by extension
lsf -Z           # Show security context
lsf -R           # Recursive listing
lsf --zero       # NUL-terminated output
lsf --help       # Show help message
lsf --version    # Show version

πŸ“‹ Prerequisites

Bash 4+

For full icon support. Works on any POSIX shell without icons.

echo $BASH_VERSION

Python 3.x

For column formatting helper.

python3 --version

Nerd Fonts (Optional)

Recommended for beautiful icons.

fc-list | grep "Nerd Font"

🎨 Customization

Edit ~/.config/lsf/lsf.conf to customize icons and colors:

# Change directory icon
ICONS["dir"]=""
COLORS["dir"]="94"  # Bright blue

# Change Python file icon
ICONS[".py"]=""
COLORS[".py"]="92"  # Bright green

# Change JSON file icon
ICONS[".json"]=""
COLORS[".json"]="36"  # Cyan

See Configuration Guide for more options and examples.

❓ Frequently Asked Questions

Q: Icons appear as boxes or question marks. What's wrong?

A: Your terminal font is not set to a Nerd Font. Download from nerdfonts.com and set it as your terminal font.

Q: Do I need root/sudo access?

A: No! Use ./install.sh --user to install to ~/.local/bin without sudo. Use sudo ./install.sh --system for system-wide installation.

Q: What if I don't want to replace my ls command?

A: No problem! Just use lsf directly. Or set an alias, but don't alias it to ls. Example: alias ll='lsf -l'

Q: Is it safe to use as my default ls?

A: Yes! ls-f is fully compatible with all standard ls commands and flags. It falls back gracefully when icons aren't supported.

Q: How do I uninstall?

A: rm ~/.local/bin/lsf ~/.local/bin/column.py (user install) or use sudo for system install. Remove the alias from your shell config.

Q: Does it work on macOS?

A: Yes! Install via brew install bash to get Bash 4+, then install ls-f normally.

πŸ“š Documentation

πŸ“– Installation Guide

Detailed step-by-step instructions for all platforms and methods.

Read Guide β†’

βš™οΈ Configuration Guide

Learn how to customize icons, colors, and behavior.

Read Guide β†’

πŸ”§ Troubleshooting

Solutions to common issues and problems.

Read Guide β†’

πŸ“Š Project Stats

100+
File Type Icons
3
Install Methods
0ms
Overhead
MIT
License

Ready to Transform Your Terminal?

Install ls-f now and enjoy a beautiful, efficient file listing experience.

Get Started Now