# eza — A Modern Colorful Replacement for ls > eza is a modern replacement for the venerable ls command. Adds colors, Git status, file type icons, tree view, and long-format improvements. Actively maintained fork of the archived exa project. ## Install Save as a script file and run: ## Quick Use ```bash # Install brew install eza # macOS sudo apt install eza # Debian/Ubuntu cargo install eza # Rust scoop install eza # Windows # Replace ls in shell config alias ls="eza" alias ll="eza -lbhF --git" alias la="eza -labhF --git" alias lt="eza --tree --level=2" ``` Usage: ```bash eza # Colorful ls eza -l # Long format eza -l --git # Show git status eza --tree # Tree view eza -T --level=3 # Tree with depth limit eza --icons # File type icons (needs Nerd Font) eza -l --sort=modified # Sort by mtime eza -l --group-directories-first ``` ## Intro eza is a modern, maintained replacement for the venerable `ls` command. Fork of the archived `exa` project with active development and new features. Written in Rust with colors, Git status, file icons, tree view, and better long-format output. A quality-of-life upgrade every terminal user can appreciate. - **Repo**: https://github.com/eza-community/eza - **Stars**: 21K+ - **Language**: Rust - **License**: EUPL 1.2 ## What eza Does - **Colors by file type** — via LS_COLORS or custom scheme - **Git status** — show modified/added/ignored files - **File icons** — Nerd Font icons for file types - **Tree view** — recursive with depth control - **Long format** — human-readable sizes, permissions, modified time - **Extended attrs** — xattrs, ACLs, selinux - **Sort options** — name, size, mtime, accessed, created - **Filters** — only dirs, only files, hidden ## Architecture Single Rust binary, replaces ls. Reads filesystem + optional git repo state + file metadata. Parses LS_COLORS for theming. Uses Unicode width for correct alignment. ## Self-Hosting CLI tool. ## Key Features - Drop-in ls replacement - Git integration - Nerd Font icons - Tree view - Color scheme support - Accurate Unicode width - Actively maintained (unlike archived exa) - Cross-platform ## Comparison | Tool | Git | Icons | Tree | Maintained | |---|---|---|---|---| | eza | Yes | Yes | Yes | Yes | | exa | Yes | Yes | Yes | Archived | | lsd | Yes | Yes | Yes | Yes | | ls (GNU) | No | No | Partial | Yes | | tree | No | Partial | Yes | Yes | ## 常见问题 FAQ **Q: eza vs lsd?** A: 两者都不错。eza 更接近 ls 的用法和长格式输出;lsd 预设更花哨。看个人偏好。 **Q: 图标乱码?** A: 需要安装 Nerd Font(如 JetBrainsMono Nerd Font、FiraCode NF)并在终端里启用。 **Q: 能完全替换 ls 吗?** A: 90% 兼容,但不要替换系统脚本用的 ls(POSIX 要求)。用 shell alias 或 PATH 覆盖只影响交互式 shell。 ## 来源与致谢 Sources - Docs: https://eza.rocks - GitHub: https://github.com/eza-community/eza - License: EUPL 1.2 --- Source: https://tokrepo.com/en/workflows/d3b64cc3-35cb-11f1-9bc6-00163e2b0d79 Author: Script Depot