How lsd-rs/lsd works
lsd is a terminal file-listing application: it accepts paths and display options, gathers filesystem metadata (including optional Git status), orders entries, and renders grid, long, or tree output with configurable colors and icons. The graph follows that user-to-output flow and retains the major customization and metadata capabilities. Some orchestration and subsystem calls are supported only by the SOURCE INDEX; those links are marked dashed with no evidence path rather than presented as inspected call sites.
Main entry points: core.rs Listing coordinator · display.rs Layout rendering · theme.rs Theme loading · app.rs CLI arguments
Components 17
Invocation and options
- CLI arguments
src/app.rs - Configuration files
src/config_file.rs - Resolved options
src/flags.rs
Listing pipeline
- Listing coordinator
src/core.rs - Entry sorting
src/sort.rs
Entry metadata
- Filesystem metadata
src/meta/mod.rs - Names and links
src/meta/name.rs - Git status
src/git.rs - Per-entry Git state
src/meta/git_file_status.rs
Output and themes
- Layout rendering
src/display.rs - Color styling
src/color.rs - Icon rendering
src/icon.rs - Theme loading
src/theme.rs - Color theme
src/theme/color.rs - Icon theme
src/theme/icon.rs - Git theme symbols
src/git_theme.rs
Other components
- CLI user
Connections 21
- CLI user → CLI arguments: supplies options
README.md - CLI arguments → Resolved options: configures
src/flags.rs - Configuration files → Resolved options: provides defaults
src/flags.rs - CLI arguments → Listing coordinator: starts listing
- Resolved options → Listing coordinator: controls listing
src/core.rs - Listing coordinator → Filesystem metadata: gathers entries
src/core.rs - Filesystem metadata → Git status: requests status
src/meta/mod.rs - Git status → Per-entry Git state: produces status
src/git.rs - Listing coordinator → Entry sorting: orders entries
src/core.rs - Listing coordinator → Layout rendering: renders listing
src/core.rs - Layout rendering → Filesystem metadata: renders metadata
src/display.rs - Layout rendering → Names and links: renders names
src/display.rs - Names and links → Icon rendering: requests icon
src/meta/name.rs - Names and links → Color styling: uses styling
src/meta/name.rs - Layout rendering → Color styling: styles output
src/display.rs - Theme loading → Configuration files: finds config paths
src/theme.rs - Theme loading → Color theme: loads color theme
src/theme.rs - Theme loading → Icon theme: loads icon theme
src/theme.rs - Color styling → Color theme: uses theme
src/color.rs - Icon rendering → Icon theme: uses theme
src/icon.rs - Listing coordinator → Git theme symbols: configures Git display
src/core.rs