Files
Your Name 2bc5b56ff9 feat(zsh): alias tree -> erdtree, track its config, install it on fresh boxes
erdtree (erd) replaces GNU tree as the tree-style directory lister. It uses
a parallel walker (the `ignore` crate, one thread per core) where GNU tree is
strictly serial. Benchmarked over 658k entries under ~/development, best-of-3,
warm cache, plain output, hidden included, gitignore off:

  erd (16 threads)   2.35s
  GNU tree 2.1.0     4.22s   (1.8x slower)
  erd (1 thread)     4.97s   (so ~2.1x thread scaling)
  eza --tree        15.87s   (6.8x slower)

Three changes:

- home_config/erdtree/.erdtree.toml — erd ships as a disk-usage tool, so its
  stock defaults are root-at-bottom, size-sorted, with a du column. The
  top-level table overrides that to behave like GNU tree; `erd -c du` keeps
  the original behaviour and `erd -c all` disables the gitignore/hidden
  filtering. Stowed to ~/.config/erdtree.

- home_root/.zshrc — `alias tree='erd'`, plus ~/.zfunc prepended to fpath for
  the generated completion. The fpath line goes before the primary compinit
  at the top of the file rather than adding a third compinit call after it.

- lk-installers/install-apps — erd is now a runtime assumption of the
  dotfiles (the alias depends on it), so a fresh box must get it: brew on
  macOS, cargo on Linux (not packaged in Debian apt). The zsh completion is
  generated per installed version rather than tracked, matching how the other
  generated completions in this repo are handled.

Caveat worth knowing: erd respects .gitignore by default, which GNU tree does
not. `-i` disables it, `-.` shows hidden files.
2026-08-14 00:09:48 -07:00

40 lines
1.6 KiB
TOML

# erdtree (erd) configuration — /home/lkraven/.config/erdtree/.erdtree.toml
#
# The top-level table below is the DEFAULT for a bare `erd`. Named tables are
# opt-in via `erd -c <name>`.
#
# Rationale: erd ships as a disk-usage tool — its stock defaults are root-at-
# bottom, sorted by size, with a du column. That is a fine `du` replacement but
# a surprising `tree`. This config makes the bare invocation behave like GNU
# tree (root at top, name-sorted, dirs first, no size column) and moves the
# disk-usage behaviour behind `erd -c du`.
#
# Note: erd respects .gitignore by default. That is kept — it is why listing a
# repo is fast and readable. Pass `-i` to ignore .gitignore, `-.` for hidden
# files, `-. --no-git` for hidden-but-not-.git.
# ---- default: tree-like folder listing ----
layout = "inverted" # root at top, like GNU tree
sort = "name" # lexicographic, like GNU tree
dir-order = "first" # directories above files
suppress-size = true # no disk-usage column
no-progress = true # no progress indicator on fast listings
# ---- `erd -c du` : the disk-usage mode erd was actually built for ----
[du]
layout = "inverted"
sort = "rsize" # largest first
dir-order = "first"
human = true # human-readable byte sizes
disk-usage = "physical" # actual blocks on disk
# ---- `erd -c all` : everything, nothing hidden or ignored ----
[all]
layout = "inverted"
sort = "name"
dir-order = "first"
suppress-size = true
no-progress = true
hidden = true
no-ignore = true