Skip to content

feat(shell): eza aliases, zoxide cd, and tmpl diff highlighting#88

Merged
aguil merged 6 commits into
masterfrom
feat/shell-eza-zoxide
Jun 8, 2026
Merged

feat(shell): eza aliases, zoxide cd, and tmpl diff highlighting#88
aguil merged 6 commits into
masterfrom
feat/shell-eza-zoxide

Conversation

@aguil

@aguil aguil commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add shared profile.d/eza-aliases.sh (ls, ll, la, lla, lt, lS) when eza is on PATH, plus brew "eza" on macOS.
  • Move zoxide into profile.d/zoxide-init.sh.tmpl: human shells get zoxide init --cmd cd (bash and zsh); agent subprocesses skip zoxide (CURSOR_AGENT, CLAUDECODE=1, CUSTOM_AGENT_SHELL) so they keep normal cd and avoid database noise.
  • Source profile.d before mise activate so agent detection runs first; mise cd hook (__zsh_like_cd) stays enabled in agent sessions for per-directory tool versions.
  • Default delta to Bash syntax for .tmpl files in chezmoi/dotfiles repos (gitconfig-chezmoi, scoped jj pager, bat --map-syntax). Per-host languages (toml vs bash) and Go template overlay deferred until delta supports map-syntax or combined grammars.

Test plan

  • chezmoi apply
  • brew install eza zoxide bat (if missing)
  • Human bash/zsh: type cd → zoxide function; alias ll → eza
  • CURSOR_AGENT=1 bash -lc 'type z' → not found; type cd → function (__zsh_like_cd from mise)
  • jj diff dot_bash_profile.tmpl and jj show — syntax highlighting on .tmpl hunks
  • just repos::pre-commit-verify (or local pre-commit) on touched files

aguil added 2 commits June 8, 2026 09:07
Remove the pinned Python entry from the asdf tool versions file and
normalize spacing in the remaining tool declarations.

This keeps the shared tool list focused on tools managed by the dotfiles.
Add shared profile.d aliases (ls, ll, la, lla, lt, lS) gated on eza
being on PATH so bash and zsh share the same directory listing UX.
Install eza via Homebrew on macOS.

Verify: chezmoi apply && source ~/.config/chezmoi/profile.d/eza-aliases.sh && alias ll
@aguil aguil force-pushed the feat/shell-eza-zoxide branch from 0b09c9e to 451de79 Compare June 8, 2026 15:13
Move zoxide init into shared profile.d and use --cmd cd for bash and zsh.
Skip zoxide in agent subprocesses (CURSOR_AGENT, CLAUDECODE=1,
CUSTOM_AGENT_SHELL) so they keep builtin cd and avoid database noise.
Add zoxide to the Brewfile.

Verify: chezmoi apply && type cd
@aguil aguil force-pushed the feat/shell-eza-zoxide branch 2 times, most recently from 08d1b1c to f4d1846 Compare June 8, 2026 15:21
Load profile.d (00-agent-shell.sh, zoxide-init) before mise activate so
agent subprocesses skip zoxide while keeping full mise cd hooks for
per-directory tool versions.

Verify: CURSOR_AGENT=1 bash -lc 'type z'  # not found
@aguil aguil force-pushed the feat/shell-eza-zoxide branch from f4d1846 to 8c2a8ee Compare June 8, 2026 15:24
@aguil aguil changed the title feat(shell): eza listing aliases and zoxide smart cd feat(shell): eza aliases, zoxide cd, and tmpl diff highlighting Jun 8, 2026
@aguil aguil force-pushed the feat/shell-eza-zoxide branch 2 times, most recently from 3e86188 to c8284bf Compare June 8, 2026 15:59
aguil added 2 commits June 8, 2026 10:02
Delta/syntect do not recognize the .tmpl extension, so jj diff/show
rendered chezmoi templates as plain text. Default to Bash syntax in
chezmoi and dotfiles repos via scoped jj pager and gitconfig-chezmoi;
add bat --map-syntax for previews.

Per-host languages (toml vs bash) and Go template overlay remain future
work until delta supports map-syntax or combined grammars.

Verify: chezmoi apply && jj diff dot_bash_profile.tmpl
profile.d ran zoxide before mise activate, so mise's __zsh_like_cd
replaced zoxide's cd. Defer zoxide init until after mise and re-wrap
__zoxide_cd in bash so mise hook-env still runs on directory changes.

Verify: chezmoi apply && source ~/.bash_profile && type cd
@aguil aguil force-pushed the feat/shell-eza-zoxide branch from c8284bf to f4b3099 Compare June 8, 2026 16:02
@aguil aguil merged commit ede2fe0 into master Jun 8, 2026
1 check passed
@aguil aguil deleted the feat/shell-eza-zoxide branch June 8, 2026 16:11
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