Skip to content

Color file listings, and show icons with eza - #11

Merged
srozen merged 2 commits into
mainfrom
file-listings
Nov 5, 2026
Merged

srozen merged 2 commits into
mainfrom
file-listings

Conversation

@srozen

@srozen srozen commented Nov 5, 2026

Copy link
Copy Markdown
Owner

File listings in Codec now look like a modern Linux terminal's: ls colors files by type in the theme's palette, and, with eza, shows a Nerd Font icon by each name, in any font.

ls through eza: an icon by each name, folders first, and a long listing with git's status

Colors

ls colors folders, links and executables, and every other file in the color its icon has in the file tree (Swift red, Markdown blue, lockfiles gray). Panes get CLICOLOR, LSCOLORS (macOS's ls) and LS_COLORS (eza, GNU ls, zsh's completion menu), each only if it isn't already set, and the user's .zshrc still wins. The colors are named as terminal colors, so a listing follows the theme; only the accent is 24-bit. FileType.color moved into CodecCore, so the file tree and FileListingColors share one table. On by default: Settings › Shell › Color files by type.

eza, with icons

Settings › Shell › Use eza for ls (off by default) makes ls an alias for eza --icons=auto --group-directories-first, set by the zsh integration at the first prompt. An ls alias or function of the user's own is kept, unless all it does is turn on color (ls -G).

When eza isn't installed, the same section shows Install with Homebrew, which runs brew install eza in a new tab (where it can be watched and answered) and turns the setting on. Without Homebrew, it links to eza's install instructions.

Icons in any font

Codec now bundles Nerd Fonts' symbols (Resources/Fonts, MIT, 2.4 MB; build-app.sh copies it into the app). SwiftTerm takes one fallback font, so Codec's glyph font gets a CoreText cascade list that reaches the symbols. Codec claims only the private-use characters and power symbols that font has: they're placed as icons, and Powerline's separators stretch to fill their cell. Ordinary symbols (♥ ⚡ ❯) stay with the system, and a patched Nerd Font keeps its own. Starship, lsd and Neovim file trees benefit too.

Screenshots

All of docs/images was retaken with make screenshots. The tour has a new listing shot (above), used in the command line docs. It now clears NO_COLOR, which swift test sets and eza honors. Plain ls in the theme grid now shows folders in color:

The four themes

Testing

  • swift build -j 2 --build-tests, swift test -j 2 --skip-build: all 518 pass. New tests cover the LS_COLORS table, the eza alias in a real zsh (installed, replacing a color-only alias, keeping a user's own, no eza, setting off), the icon fallback down to the run's font, the pane's environment, finding eza and Homebrew, and running a command in a new tab.
  • ARCHS="arm64 x86_64" scripts/build-app.sh release: builds, with the font in Contents/Resources/Fonts.
  • Tried locally with eza 0.23.5 from Homebrew. The Install with Homebrew row wasn't checked on screen, since eza is installed on this Mac.
  • Icons fit in one cell, so they're a little smaller than in terminals that let them overflow.

🤖 Generated with Claude Code

srozen and others added 2 commits November 5, 2026 11:22
ls now shows files in color: folders blue, links cyan, executables green,
and every other file in the color its icon has in the file tree. Panes get
CLICOLOR, LSCOLORS and LS_COLORS (for macOS's ls, and for eza, GNU ls and
zsh's completion), each unless it's already set, and the user's startup
files still win. The colors are named as terminal colors, so a listing
follows the theme; only the accent is given as 24-bit color. FileType now
carries its color in CodecCore, so the file tree and FileListingColors
share one table.

Settings › Shell › Use eza for ls makes ls run eza with icons and folders
first, through an alias the zsh integration sets at the first prompt. An
ls alias or function of the user's own is left alone, unless all it does
is turn on color. When eza isn't installed, Settings offers to install it:
with Homebrew, brew install eza runs in a new tab, where it can be watched
and answered, and the setting turns on; without, it links to eza's
instructions.

The icons show in any font. Codec now carries Nerd Fonts' symbols (MIT,
in Resources/Fonts, bundled by build-app.sh), and its glyph font cascades
to them: SwiftTerm takes a single fallback font, and CoreText's cascade
list lets that one font reach the icons too. Only private-use characters
and the power symbols the font has are claimed, placed as icons, with
Powerline's separators stretched to fill their cell, so ordinary symbols
are still the system's and a patched Nerd Font keeps its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tour gains a shot of ls through eza, with icons and a long listing
with git's status, for the Listing files section of the command line
docs. It clears NO_COLOR, which swift test sets and the panes would pass
on to eza; Codec opened from the Finder has none. The open-file shot
lists ten files now, as the two new ones in CodecCore pushed
FileTree.swift past the eighth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@srozen
srozen merged commit a88477d into main Nov 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant