aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-06-16 18:50:56 +0200
committerDanilo M. <danix@danix.xyz>2026-06-16 18:50:56 +0200
commitdb404714f29ca0230e1a2ba48f7fdc23ff511dbb (patch)
treebaf5ee5ebcea72ef266894c35263fd5f3d6ae329 /README.md
parentf90d7f606aca51235fdb2a22fdf2263218138331 (diff)
downloaddots-backup-db404714f29ca0230e1a2ba48f7fdc23ff511dbb.tar.gz
dots-backup-db404714f29ca0230e1a2ba48f7fdc23ff511dbb.zip
docs: document --suggest flag and SUGGEST_IGNORE
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 6 insertions, 0 deletions
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.