diff options
| author | 2026-04-21 01:23:48 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:23:48 +0100 | |
| commit | 5a8678d2d3680bfa87b8786b68b13e63f35d3cdb (patch) | |
| tree | a87b39e0d39e1a3d83bb55dd3b9ded4412e1a7bc /justfile | |
| parent | dd7cede921cb3b5b003cfecc3ab7d76f16df841c (diff) | |
| download | dotfiles-5a8678d2d3680bfa87b8786b68b13e63f35d3cdb.tar.gz dotfiles-5a8678d2d3680bfa87b8786b68b13e63f35d3cdb.tar.bz2 dotfiles-5a8678d2d3680bfa87b8786b68b13e63f35d3cdb.zip | |
feat(just): include etc in status & diff recipes
- status now runs etc-drift alongside pkg-drift and dotfile-drift
- diff routes /etc/* paths to etc-diff; with no arg, runs both
chezmoi diff and etc-diff so drift in /etc is visible alongside
$HOME dotfiles.
Diffstat (limited to 'justfile')
| -rw-r--r-- | justfile | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -41,8 +41,8 @@ fix: # Inspection # ═══════════════════════════════════════════════════════════════════ -# Show package and dotfile drift (runs pkg-drift + dotfile-drift) -status: pkg-drift dotfile-drift +# Show package and dotfile drift (runs pkg-drift + dotfile-drift + etc-drift) +status: pkg-drift dotfile-drift etc-drift # Show package drift: missing packages in adopted groups + undeclared installed packages pkg-drift: @@ -69,9 +69,20 @@ undeclared: echo "$active" | grep -qxF "$pkg" || echo "$pkg" done -# Show dotfile diffs; pass a path to limit to a single file (e.g. just diff .config/nvim/init.lua) +# Show dotfile + /etc diffs; pass a path to limit to a single file (e.g. just diff .config/nvim/init.lua) diff file="": - chezmoi diff -S . {{ file }} + #!/usr/bin/env bash + set -eo pipefail + f='{{ file }}' + case "$f" in + /etc/*|etc/*) + just etc-diff "$f" ;; + "") + chezmoi diff -S . + just etc-diff ;; + *) + chezmoi diff -S . "$f" ;; + esac # Resolve dotfile conflicts with a 3-way merge; pass a path for one file, or omit to merge all merge file="": |
