How ogham/exa works
exa is a Rust command-line file-listing application. The user supplies paths and options; the program parses configuration, discovers directory entries and metadata, applies filtering and sorting, then formats the results as grid, line, long-details, or tree-style output for the terminal. Long views include metadata such as permissions, timestamps, links, and optional Git status or extended attributes; themes and file-type coloring support presentation. Relationships below follow the README and the available source excerpts and index; some output and option modules were not sampled in full.
Main entry points: main.rs Command entry · details.rs Details view · mod.rs Option configuration · table.rs Metadata table
Components 25
CLI and orchestration
- Command entry
src/main.rs - Option configuration
src/options/mod.rs - Argument parser
src/options/parser.rs - Environment options
src/options/vars.rs
Filesystem and metadata
- Directory traversal
src/fs/dir.rs - File metadata
src/fs/file.rs - Metadata fields
src/fs/fields.rs - Filtering and sorting
src/fs/filter.rs - Git status
src/fs/feature/git.rs - Extended attributes
src/fs/feature/xattr.rs - File type detection
src/info/filetype.rs
Output presentation
- Grid view
src/output/grid.rs - Line view
src/output/lines.rs - Details view
src/output/details.rs - Grid details view
src/output/grid_details.rs - Metadata table
src/output/table.rs - Tree rendering
src/output/tree.rs - File name rendering
src/output/file_name.rs - Text cells
src/output/cell.rs - Time formatting
src/output/time.rs
Themes and styling
- Theme and colors
src/theme/mod.rs - File icons
src/output/icons.rs
Other components
- User
- Terminal output
- Filesystem
Connections 31
- User → Command entry: invokes
README.md - Command entry → Option configuration: parses options
src/main.rs - Option configuration → Argument parser: parses arguments
src/options/mod.rs - Option configuration → Environment options: reads environment
src/options/mod.rs - Command entry → Directory traversal: lists paths
src/main.rs - Directory traversal → Filesystem: reads entries
src/fs/dir.rs - Directory traversal → File metadata: constructs entries
src/fs/dir.rs - File metadata → Metadata fields: provides metadata
src/fs/file.rs - Option configuration → Filtering and sorting: configures filters
src/options/filter.rs - Command entry → Filtering and sorting: filters entries
src/main.rs - Command entry → Git status: obtains status
src/main.rs - Details view → Extended attributes: reads attributes
src/output/details.rs - File type detection → File metadata: inspects file
src/info/filetype.rs - Command entry → Grid view: renders grid
src/main.rs - Command entry → Line view: renders lines
src/main.rs - Command entry → Details view: renders details
src/main.rs - Command entry → Grid details view: renders grid details
src/main.rs - Details view → Metadata table: builds rows
src/output/details.rs - Details view → Tree rendering: uses tree layout
src/output/details.rs - Grid details view → Details view: uses details
src/output/grid_details.rs - Grid details view → Grid view: uses grid layout
src/output/grid_details.rs - Metadata table → Metadata fields: formats metadata
src/output/table.rs - Metadata table → Git status: gets status
src/output/table.rs - Metadata table → Time formatting: formats timestamps
src/output/table.rs - Details view → File name rendering: renders names
src/output/details.rs - File name rendering → File icons: selects icons
src/output/file_name.rs - File name rendering → Text cells: builds contents
src/output/file_name.rs - Grid view → File name rendering: renders names
src/output/grid.rs - Theme and colors → File type detection: colors file types
src/theme/mod.rs - Command entry → Theme and colors: configures theme
src/main.rs - Command entry → Terminal output: writes output
src/main.rs