diff options
| author | 2026-04-21 01:23:27 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:23:27 +0100 | |
| commit | 7ef0202e2eee0feaeac3041fe2643f4d3b82ce3d (patch) | |
| tree | 8c5752bcd3336e767a4f8c075c39880fb3fd8442 /justfile | |
| parent | 3791833e57a43c86540907da573ce354562e0600 (diff) | |
| download | dotfiles-7ef0202e2eee0feaeac3041fe2643f4d3b82ce3d.tar.gz dotfiles-7ef0202e2eee0feaeac3041fe2643f4d3b82ce3d.tar.bz2 dotfiles-7ef0202e2eee0feaeac3041fe2643f4d3b82ce3d.zip | |
feat: add 'just diff' and 'just merge' for chezmoi drift investigation
Both accept an optional file path. 'just merge' without an argument
runs chezmoi merge-all (interactive across all modified files);
with an argument it merges just that one target.
Diffstat (limited to 'justfile')
| -rw-r--r-- | justfile | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -74,6 +74,19 @@ status: echo "=== Dotfile drift ===" chezmoi status -S . || true +# Show dotfile diffs; pass a path to limit to a single file (e.g. just diff .config/nvim/init.lua) +diff file="": + chezmoi diff -S . {{ file }} + +# Resolve dotfile conflicts with a 3-way merge; pass a path for one file, or omit to merge all +merge file="": + #!/bin/sh + if [ -n '{{ file }}' ]; then + chezmoi merge -S . '{{ file }}' + else + chezmoi merge-all -S . + fi + # Show per-group install coverage; pass a group name for a per-package breakdown groups group="": #!/bin/sh |
