From db404714f29ca0230e1a2ba48f7fdc23ff511dbb Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 16 Jun 2026 18:50:56 +0200 Subject: docs: document --suggest flag and SUGGEST_IGNORE Co-Authored-By: Claude Opus 4.8 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index d75e366..1a7ea3b 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ git push -u origin master -v, --verbose Print each file as rsync transfers it -r, --restore Restore dotfiles from backup to original locations -q, --quiet Suppress stdout; write output to log instead + -s, --suggest List untracked config dirs/files new since last backup, then exit -p, --push Push to remote after commit -h, --help Show this help ``` @@ -129,10 +130,13 @@ LOG_FILE="${HOME}/.local/share/dot-backup/backup.log" DOTFILES_LIST="${HOME}/.config/dot-backup/files.list" GIT_REMOTE="git@github.com:you/my-dotfiles.git" GIT_BRANCH="master" +SUGGEST_IGNORE=(.cache .local .git .ssh ...) ``` `GIT_REMOTE` — if set, script ensures it is registered as `origin` on every run. Required for `--push`. `GIT_BRANCH` defaults to the current branch if unset. +`SUGGEST_IGNORE` — basenames `--suggest` skips when scanning for new config (overrides the baked-in default). See `config.example` for the full default list. + ## Adding Files **External list (recommended)** — create `~/.config/dot-backup/files.list` with one path per line. When this file exists and is non-empty it replaces the built-in list entirely: @@ -150,3 +154,5 @@ GIT_BRANCH="master" **Built-in fallback** — if `files.list` is missing or empty, the script uses the `DOTFILES` array hardcoded in `dot-backup.sh`. Relative paths are treated as `$HOME`-relative. Absolute paths (starting with `/`) are treated as system files. + +**Discovering new files** — `--suggest` scans `~/.config` children and top-level hidden dirs/files in `$HOME`, and prints any that are newer than the last backup and not already tracked, formatted for pasting into `files.list`. It never copies or commits. Tune what it skips with `SUGGEST_IGNORE` in the config file. -- cgit v1.2.3