Skip to content

Add zsh defaults and Touch ID for sudo - #9

Merged
maximn merged 2 commits into
mainfrom
shell-defaults-touch-id
Oct 11, 2026
Merged

maximn merged 2 commits into
mainfrom
shell-defaults-touch-id

Conversation

@maximn

@maximn maximn commented Oct 10, 2026

Copy link
Copy Markdown
Owner

The rest of the "better defaults" from the modernization plan. The gitconfig part went in with #7.

zshrc

  • fzf lists files with fd, so it skips what .gitignore lists (Ctrl-T, Option-C), and Ctrl-T previews the file with bat
  • EDITOR defaults to vim
  • Man pages are shown through bat, so they're in color

Each is only a default: a value set in ~/.zshrc before the repo's zshrc loads still wins.

Touch ID for sudo

macos-defaults.sh adds pam_tid.so to /etc/pam.d/sudo_local, which survives macOS updates. The new pam-reattach formula, added above it, makes Touch ID work inside herdr and tmux too.

  • Safe to re-run. If pam-reattach is installed later, a re-run adds it above pam_tid.so
  • Ignores the template's commented-out #auth ... pam_tid.so line
  • Skips with a message on macOS older than 14, which has no sudo_local

Testing

  • zshrc: checked the exported values with stub fd and bat commands, with and without values set beforehand
  • Touch ID: ran the block against fake pam files with a pass-through sudo in five situations: before and after installing pam-reattach, a re-run (no change), the template's commented-out line, and macOS older than 14
  • Not run on a real Mac yet. CI covers shellcheck, the interactive zsh check, and whether pam-reattach exists in Homebrew. Touch ID itself still needs testing by hand

Not included

Caching compinit: startup time needs measuring on a Mac first.

🤖 Generated with Claude Code

maximn and others added 2 commits October 10, 2026 21:14
zshrc: fzf lists files with fd, so it skips what .gitignore lists, and
previews them with bat on Ctrl-T. EDITOR defaults to vim and man pages are
shown through bat. Each is only a default: a value set before the repo's
zshrc loads still wins.

macos-defaults.sh turns on Touch ID for sudo in /etc/pam.d/sudo_local, which
survives macOS updates. The new pam-reattach formula makes it work inside
herdr and tmux too. It's safe to re-run, and once pam-reattach is installed a
re-run adds it above pam_tid.so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maximn
maximn merged commit 3acf98a into main Oct 11, 2026
5 checks passed
@maximn
maximn deleted the shell-defaults-touch-id branch October 11, 2026 12:07
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